Translate

Monday, April 25, 2016

Hello World Github Repository


The Hello World project is a time-honored tradition in computer programming. It is a simple exercise that gets you started when learning something new. Let’s get started with GitHub!
You’ll learn how to:
  • Create and use a repository
  • Start and manage a new branch
  • Make changes to a file and push them to GitHub as commits
  • Open and merge a pull request

What is GitHub?

GitHub is a code hosting platform for version control and collaboration. It lets you and others work together on projects from anywhere.
This tutorial teaches you GitHub essentials like repositoriesbranchescommits, and Pull Requests. You’ll create your own Hello World repository and learn GitHub’s Pull Request workflow, a popular way to create and review code.

No coding necessary

To complete this tutorial, you need a GitHub.com account and Internet access. You don’t need to know how to code, use the command line, or install Git (the version control software GitHub is built on).
Tip: Open this guide in a separate browser window (or tab) so you can see it while you complete the steps in the tutorial.

Step 1. Create a Repository

repository is usually used to organize a single project. Repositories can contain folders and files, images, videos, spreadsheets, and data sets – anything your project needs. We recommend including a README, or a file with information about your project. GitHub makes it easy to add one at the same time you create your new repository. It also offers other common options such as a license file.
Your hello-world repository can be a place where you store ideas, resources, or even share and discuss things with others.

To create a new repository

  1. In the upper right corner, next to your avatar or identicon, click  and then select New repository.
  2. Name your repository hello-world.
  3. Write a short description.
  4. Select Initialize this repository with a README.
new-repo-form
Click Create repository:tada:

Step 2. Create a Branch

Branching is the way to work on different versions of a repository at one time.
By default your repository has one branch named master which is considered to be the definitive branch. We use branches to experiment and make edits before committing them to master.
When you create a branch off the master branch, you’re making a copy, or snapshot, of master as it was at that point in time. If someone else made changes to the master branch while you were working on your branch, you could pull in those updates.
This diagram shows:
  • The master branch
  • A new branch called feature (because we’re doing ‘feature work’ on this branch)
  • The journey that feature takes before it’s merged into master
a branch
Have you ever saved different versions of a file? Something like:
  • story.txt
  • story-joe-edit.txt
  • story-joe-edit-reviewed.txt
Branches accomplish similar goals in GitHub repositories.
Here at GitHub, our developers, writers, and designers use branches for keeping bug fixes and feature work separate from our master (production) branch. When a change is ready, they merge their branch into master.

To create a new branch

  1. Go to your new repository hello-world.
  2. Click the drop down at the top of the file list that says branch: master.
  3. Type a branch name, readme-edits, into the new branch text box.
  4. Select the blue Create branch box or hit “Enter” on your keyboard.
branch gif
Now you have two branches, master and readme-edits. They look exactly the same, but not for long! Next we’ll add our changes to the new branch.

Step 3. Make and commit changes

Bravo! Now, you’re on the code view for your readme-edits branch, which is a copy of master. Let’s make some edits.
On GitHub, saved changes are called commits. Each commit has an associatedcommit message, which is a description explaining why a particular change was made. Commit messages capture the history of your changes, so other contributors can understand what you’ve done and why.

Make and commit changes

  1. Click the README.md file.
  2. Click the  pencil icon in the upper right corner of the file view to edit.
  3. In the editor, write a bit about yourself.
  4. Write a commit message that describes your changes.
  5. Click Commit changes button.
commit
These changes will be made to just the README file on your readme-editsbranch, so now this branch contains content that’s different from master.

Step 4. Open a Pull Request

Nice edits! Now that you have changes in a branch off of master, you can open a pull request.
Pull Requests are the heart of collaboration on GitHub. When you open a pull request, you’re proposing your changes and requesting that someone review and pull in your contribution and merge them into their branch. Pull requests showdiffs, or differences, of the content from both branches. The changes, additions, and subtractions are shown in green and red.
As soon as you make a commit, you can open a pull request and start a discussion, even before the code is finished.
By using GitHub’s @mention system in your pull request message, you can ask for feedback from specific people or teams, whether they’re down the hall or 10 time zones away.
You can even open pull requests in your own repository and merge them yourself. It’s a great way to learn the GitHub Flow before working on larger projects.

Open a Pull Request for changes to the README

Click on the image for a larger version
StepScreenshot
Click the  Pull Request tab, then from the Pull Request page, click the green New pull request button.pr-tab
Select the branch you made,readme-edits, to compare with master (the original).branch
Look over your changes in the diffs on the Compare page, make sure they’re what you want to submit.diff
When you’re satisfied that these are the changes you want to submit, click the big green Create Pull Requestbutton.create-pull
Give your pull request a title and write a brief description of your changes.pr-form
When you’re done with your message, click Create pull request!

Tip: You can use emoji and drag and drop images and gifs onto comments and Pull Requests.

Step 5. Merge your Pull Request

In this final step, it’s time to bring your changes together – merging yourreadme-edits branch into the master branch.
  1. Click the green Merge pull request button to merge the changes intomaster.
  2. Click Confirm merge.
  3. Go ahead and delete the branch, since its changes have been incorporated, with the Delete branch button in the purple box.
mergedelete

Celebrate!

By completing this tutorial, you’ve learned to create a project and make a pull request on GitHub! :tada: :octocat: :zap:
Here’s what you accomplished in this tutorial:
  • Created an open source repository
  • Started and managed a new branch
  • Changed a file and committed those changes to GitHub
  • Opened and merged a Pull Request
Take a look at your GitHub profile and you’ll see your new contribution squares!
If you want to learn more about the power of Pull Requests, we recommend reading the GitHub Flow Guide. You might also visit GitHub Explore and get involved in an Open Source project :octocat:

Tip: Check out our other Guides and YouTube Channel for more GitHub how-tos.
Last updated April 7, 2016

33 Ways to Monetize your Website

Source: http://websitesetup.org/33-ways-to-monetize-website/


Updated 3rd of January, 2015 by Robert Mening.
It’s not a myth that you can make money with your website. A lot of websites on the Internet are made for one simple reason – to generate income. In most cases, it’s not just a hobby.
Whether you are trying to get rich or just looking for some funds to cover the hosting/domain expenses, here are some of the ways to do so.
Keep in mind that some of the strategies are more or less passive while some other techniques require a lot of on-going work. Make sure you pick something that suits well with your website.

10 most popular ways to monetize your website


1) Affiliate Marketing

Affiliate marketing is a very popular way to make money through your website/blog. In short, you sell (or recommend) someone else’s product(s) on your website. When your website visitor clicks on your affiliate link and buys the product – you’ll receive commission.
The commission is usually 30% – 70% of the product or service price. So if you promote an e-book that costs $100, you’ll get $50 for referring the buyer (just an example).
Where can I find products to promote?

2) Pay Per Click Advertising

Google has made a program called Google Adsense for publishers (bloggers, website owners) and advertisers (business owners, marketers, product owners).
This system is quite simple. You place a code on your website that will start displaying relevant ads to your website. For example, if your site is about pets (dogs & cats), Google Adsense will start showing your visitors ads for cat food, dog training and so on.
When someone clicks on the ad, you will receive money for this click. It’s usually $0,5 to $5 per click, but when your site has enough traffic – you can make hundreds if not thousands of dollars per month. Keep yourself known with their TOS, though.
How to apply for for Google Adsense?
  • Apply for AdSense – Before applying, keep yourself updated with their TOS, though. Google is very strict with their rules so it’s pretty hard to get approved.

3) Selling Ad Space

As the name says, all you need to do is sell the ad space. You set up a price, let’s say: “Banner at the sidebar will cost $xxx per month”. You will get paid upfront and the price depends on your traffic. If your site gets ton loads of traffic from different sources, the banner ad price can go up as $5000 per month. However, if your site doesn’t have much traffic, don’t expect much.
Where can I let others know that my website is selling ad space?

4) Sell your own digital product (ebook for example)

Selling your own product is awesome because there are no middle mans, no one is going to take the “cut” – it’s only YOU and the CLIENT. You can sell directly through your website and you’ll get paid directly. While it looks like a simply way to make money, it’s actually not.
It takes a lot of time to create a good product that you can actually sell through your site. So make sure it’s well-made and polished before you throw it out on your webpage. In addition, a perfectly optimized landing page for the product is essential to higher your conversion rates.
Additional resources

5) Donation / Becoming a sponsor

Setting up donation buttons or simply asking additional funds from your readers is another way to monetize your website. It’s easy to set up, but you have to be aware that it’s not so easy to make money with it. Unless you find a sponsor(s) who pays a lot! However, before you throw up your donation buttons and widgets, make sure that your visitors will see why you need those donations (hosting expenses, new product creation, researching costs etc…).
For example web.archive.org makes a lot of money from donations, but then again – they probably have millions of visitors per month.
How to set up donation buttons?

6) Accept sponsored posts & articles

Once your site is getting good amount of visitors monthly, you can offer sponsored posts and articles. There are a lot of advertisers who would be interested in writing sponsored posts for your website.
Another option is make money through reviewing something. Here’s an example: You have a website about Apple products -> marketer from Apple sees your site and contacts you.-> He/she offers you a free iPhone 5 if you make a comprehensive review and post it on your site for followers to read. This is an extreme case, but I’m sure you get the point…
Win=Win situation? Yep. However, make sure don’t accept anything completely irrelevant to your site/blog. If your site is about cats and you post a review of American Express credit card, then your visitors might have a trust issue (case study).
For further reading:

7) Generate “Leads” for other companies

Generating leads means you help other organisations or companies to make money. It can be a simple e-mail submit or telephone number, a lead is a lead.
Scenario: Let’s say you have a website about teaching and learning math. You can easily set up links to different schools and universities that offer people to learn math. When YOUR visitor submits their e-mail or a phone number to university for application – you’ll get paid.
It’s very similar to affiliate marketing, but your visitor doesn’t necessarily have to buy something. A short contact information is more than enough. The sales people will take care of the rest.
Where can I find such offers?

8) Build an “Email List”

Building a “list” means that you gather your visitors emails. 90% of the websites that get some sort of traffic use that technique – and it’s working pretty well.
You’ll not get rich overnight, but it’s definitely something long-term (and profitable). However, make sure you first create relationships with your followers by simply offering great information and/or help for FREE. Spamming different offers through emails is never a good idea.
How exactly does it work?

9) Set up an online store

You don’t always have to create a website about something. You can just create a “tool” for your business – an online store.
Bricks and Mortar businesses are becoming more and more popular since the rise of the “Internet era”. If you have enough dedication to make it work, try it out. Be aware of the competition, though. There are thousands of e-commerce website on the Internet, but only few of them make a lot of money. Plan out your strategy, keep your design up-do-date and use the latest marketing techniques.
How do I create a successful online store/shop?

10) Sell your site to someone else

I usually don’t suggest people to do that, but site flipping/selling is becoming a very lucrative business model. If you are into short-term projects and more into “quick buck” you can implement it as well.
… but you also have to know that your site has to either get a lot of traffic or generate money through different monetization methods.
The site value is usually based on the income. If your website is making $500 per/month through selling ad space, you can sell the site for $5,000 – $10,000 (12x – 22x monthly income).
Another option is to sell ready-made sites, they are much cheaper, but there’s still some money to be made.
Where can I sell my site?
OK, by now you have learned the ten most popular ways to earn money your website. But that’s not all you can do.
Below here I pointed out another 23 ways to make money with your website. Keep in mind that some of them are slightly connected with the ones above yet they are little “out of the box”.


Another 23 ways to monetize your website


11) Sell text-link ads – There’s still a slight demand for text-links ads, but you need to keep in mind that Google doesn’t tolerate it that much…
12) Set up “infolinks”– It’s quite easy to set them up, but the downside is that it’s not converting too well and the payouts per clicks are quite small. It’s a great alternative for Adsense, though.
13) Use monetization widgets – Very similar to Google Adsense, worth trying out as an alternative.
14) Set up RSS feed ads
15) Give away premium content for extra $$$ – If you are producing mind-blowing, awesome and near ideal content that helps your visitors – you can feel free ask money for that. I’m completely fine with paying for the premium content. However, at first your main goal should be growing audience and visitors; not asking them money right away.
16) Start a private forum or coaching class(es) – If you are good at something, why don’t you start advising others? It’s a great way to earn recurring income from your students.
17) Create a job board – You can set up a job board on website. You can earn money by accepting different job offers from various companies/individuals.
18) Offer consulting – You know something that other’s don’t? Offer consulting GIGs and get paid for your knowledge. You can offer consulting via email, forum and Skype.
19) Add “hire me” page on your website – If you enjoy freelancing, you can leverage your opportunities through your web page. Make sure you list down all your skills and previous tasks – this will improve your chances of getting hired.
20) Sell or rent internal pages – This isn’t very popular way to make money, but if you find someone who is interested in renting your pages – give it a go!
21) Display pop-ups advertisements – Extremely annoying, but another easy way to makesome money.
23) Display audio ads – This is something new and it’s getting more and more popular in 2015. I haven’t tried it personally, but I have read some articles about it and it definitely looks promising.
24) Sell an e-book – Many people sell e-books through their site. Some examples: If you have a website about recipes and cooking, you can easily create and sell your own recipe book. The same applies in every other niche.
25) Create a conference around your website
26) Set up a teaching program
27) Host paid webinars
28) Create a membership site
29) Offer coupons (with affiliate links) – People are eagerly looking for discount & promo codes. If you can offer a valid one, you are able to cut some money as well.
31) Offer writing gigs – If you are native & fluent – I can’t see any reason why you shouldn’t offer writing GIGs. If you are good enough, you can easily ask $20 – $30 per 500 word articles. Just let others know that you are offering this kind of service.
32) Create a paid directory/business page
33) Just copy what others are doing – My personal favourite.
P.S: If you know any other ways to monetize websites, let me know. I’ll add it in the list and credit you by putting your name behind it.

Five Alternatives for Developing Native iOS Apps



The simplest way to join the ranks of iOS developers is to learn Objective-C and/or Swift (the latter, while not quite ready for prime-time upon release, has gotten a lot better with its recent v1.2 update). But for everybody who doesn’t want to go down that route, there are other ways to create native iOS apps.
Whatever way you choose, remember: If you wish to actually deploy apps to iPhones and iPads—and list them for sale in Apple’s App Store—you must be an Apple registered developer, which costs $99 per year.
The five alternatives are Xamarin, Codename One, Embarcadero C++ Builder/Delphi XE/AppMethod, RemObjects C#/Oxygene, and DragonFireSDK.

Native, Web or Hybrid?

The aforementioned five are for native development. Web and hybrid (i.e., Web plus access to hardware) development systems are well-established, but native development systems are not as common. Virtually all of the systems (except Rem Objects C# and DragonFireSDK) are cross-platform, as well.

Xamarin

Previously known as MonoTouch, Xamarin is the 800-lb gorilla; its creators claim that nearly a million developers use the platform, which lets you create native apps using Xamarin Studio IDE on Mac or via a plugin for Visual Studio on PC. In the latter case, you still need a Mac on the same network as the PC. You can debug an app running on an iPhone that’s plugged into your Mac from Visual Studio on the PC, and it not only works very well, it’s as fast as debugging a PC program.
Xamarin uses ahead-of-time compilation to turn the C# code into native ARM code and adds a small 3.5 MB runtime. Cross-platform aside, the platform’s big benefit is access to the .NET technology (think of LINQ, Generics, Tasks etc.), and how it simplifies enormously the task of developing complex code. I’ve written code that performs string searches on lists of over half a million elements on an iPhone 5 and the response is almost instantaneous.
The only downside is that Xamarin isn’t cheap at $300 a year per developer for the Mac version, for either iOS or Android. If you want the Visual Studio plugin, it’ll cost $1,000 a year for one version, and double that for both iOS and Android. There is a free version but it has limits on app size.

Codename One

The oddly named Codename One is for Java developers, and has a free community edition as well as paid versions. Codename One requires that you upload any iOS app you want to test to their servers, which generate the Objective-C files to download and build on your Mac and deploy to your device or the App Store. Although it sounds cumbersome, the creators claim that over 75 million apps have relied on their service.
A major benefit of using Java (apart from the sheer amount of code available) is that any of the major Java IDEs (Eclipse, Netbeans or Intellij IDEA) can be used; Codename One provides a set of extensions and generic libraries. Plus Codename One itself is open-source software; with a bit of effort, you can set it up to build at home.

Embarcadero

Better known for their database clients such as DBArtisan and Rapid SQL,Embarcadero bought the Codegear (aka Borland) Delphi and C++ Builder development systems, and has transformed and modernized them. It has an annual release cycle and is up to XE 7, with XE 8 coming out soon. Its product RAD Studio has both Delphi and C++ Builder (and more), but is not cheap; thus you get two different languages (C++ and Object Pascal) to develop apps for iOS, as well as for Android and Windows.
Delphi’s popularity peaked in the late 1990s; although it never quite made it into the mainstream, it’s more than suitable as a mobile development language and easier to learn than C++.
Embarcadero’s products are generally for the enterprise market. Buying the latest Delphi or C++ Builder version to develop for mobile will set you back over $2,000. If you don’t want to shell out that sort of cash, there’s always AppMethod, a stripped-down Delphi/C++ Builder with the added benefit of being cross-platform—the Android version is free, and iOS and other versions cost about $30 a month.

Rem Objects C#/Oxygene

A solid Xamarin alternative for developing in C# is Rem Objects C#, which is clearly targeting Xamarin. (It’s Oxygene product for Object Pascal is also very good.) Nowhere is this clearer than in their definition of native, which includes not just compiling to the platform’s byte code but also having the look and feel of the platform. (That’s an indictment of Embarcadero, which uses the same FireUI on all platforms.)
In addition to this, RemObjects also offers Silver, which lets you use Swift to write code to run against the .NET, Java, Android and Cocoa APIs. It’s currently in Beta.

DragonFireSDK

This has been around a few years. For $99, you can create 2D iOS game apps in C++. Rather than provide full access to the underlying iOS API, the DragonFireSDK wraps a subset, sufficient (in theory) to create most 2D games. You can also publish free games without needing to be an Apple registered developer, by publishing through its publisher, ZimuSoft.

Conclusion

There’s no shortage of systems for developing native apps for iOS and other platforms, but cost will most likely determine your choice. Other than the annual Apple developer fee, Apple Swift costs nothing; with regard to the above platforms, Embarcadero is the most expensive. Happy Coding!