#Adding an existing project to GitHub using the command line
Simple steps to add existing project to Github.
In Terminal, change the current working directory to your local project.
##2. Initialize the local directory as a Git repository.
git init
| git branch -m old_branch new_branch # Rename branch locally | |
| git push origin :old_branch # Delete the old branch | |
| git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote |
| var myApp = angular.module('myApp').service('CordovaNetwork', ['$ionicPlatform', '$q', function($ionicPlatform, $q) { | |
| // Get Cordova's global Connection object or emulate a smilar one | |
| var Connection = window.Connection || { | |
| "CELL" : "cellular", | |
| "CELL_2G" : "2g", | |
| "CELL_3G" : "3g", | |
| "CELL_4G" : "4g", | |
| "ETHERNET" : "ethernet", | |
| "NONE" : "none", | |
| "UNKNOWN" : "unknown", |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| var mediaJSON = { "categories" : [ { "name" : "Movies", | |
| "videos" : [ | |
| { "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org", | |
| "sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ], | |
| "subtitle" : "By Blender Foundation", | |
| "thumb" : "images/BigBuckBunny.jpg", | |
| "title" : "Big Buck Bunny" | |
| }, | |
| { "description" : "The first Blender Open Movie from 2006", | |
| "sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ], |
An introduction to curl using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
Includes HTTP-Header information in the output
| var app = angular.module('demo', ['ionic', 'ngCordova', 'demo.controllers', 'demo.services']); | |
| var controllers = angular.module('demo.controllers', []); | |
| var services = angular.module('demo.services', []); |
| Model:: | |
| /*Select*/ | |
| select('col1','col2') | |
| ->select(array('col1','col2')) | |
| ->select(DB::raw('businesses.*, COUNT(reviews.id) as no_of_ratings, IFNULL(sum(reviews.score),0) as rating')) | |
| ->addSelect('col3','col4') | |
| ->distinct() // distinct select | |
| /*From*/ |
| .vagrant |