git init
: Initialize / create a new local repository. (Do this only once)git remote add origin [url without brackets]
: Connect your local repo to an online repo. (Do this only once)git add .
: Add all files to staging area.git commit -m "first commit"
: Commit changes with appropriate message.git push origin master
: Send changes to the master branch of your remote repository.git pull origin master
: Fetch and merge changes from the remote repo to your working repo.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function basic( callback ){ | |
console.log( 'do something here' ); | |
var result = 'i am the result of `do something` to be past to the callback'; | |
// if callback exist execute it | |
callback && callback( result ); | |
} | |
basic( function( result ){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module('myMdl', []).config(['$httpProvider', function($httpProvider) { | |
$httpProvider.responseInterceptors.push([ | |
'$q', '$templateCache', 'activeProfile', | |
function($q, $templateCache, activeProfile) { | |
// Keep track which HTML templates have already been modified. | |
var modifiedTemplates = {}; | |
// Tests if there are any keep/omit attributes. | |
var HAS_FLAGS_EXP = /data-(keep|omit)/; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Your init script | |
# | |
# Atom will evaluate this file each time a new window is opened. It is run | |
# after packages are loaded/activated and after the previous editor state | |
# has been restored. | |
# | |
# An example hack to log to the console when each text editor is saved. | |
# | |
# atom.workspace.observeTextEditors (editor) -> | |
# editor.onDidSave -> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
import { render } from "react-dom"; | |
const ParentComponent = React.createClass({ | |
getDefaultProps: function() { | |
console.log("ParentComponent - getDefaultProps"); | |
}, | |
getInitialState: function() { | |
console.log("ParentComponent - getInitialState"); | |
return { text: "" }; |
display: flex
// Main Axis
flex-direction: row (default), row-reverse, column, column-reverse
// Main Axis Alignments / Spacing
justify-content: flex-start (default), flex-end, space-around, space-between
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var app = angular.module('plunker', ['ui.bootstrap']); | |
app.controller('MainCtrl', function($scope, $q) { | |
$scope.text = ''; | |
$scope.chain = false; | |
$scope.progressbars = []; | |
$scope.useQ = false; | |
var count = 1; | |
var currentPromise = null; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// @define: Number of circles | |
const NO_OF_CIRCLES = 3; | |
// @define: All available colors | |
const ALL_COLORS = ["SlateBlue", "LightSteelBlue", "Crimson", "SeaGreen", "DarkMagenta", "DarkOrange", "DarkCyan", "SlateGray"]; | |
class Hello extends React.Component { | |
constructor(props) { | |
super(props); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import HomePage from './HomePage.jsx'; | |
import AboutPage from './AboutPage.jsx'; | |
import UserPage from './UserPage.jsx'; | |
import FourOhFourPage from './FourOhFourPage.jsx'; | |
const PAGES = { | |
home: HomePage, | |
about: AboutPage, | |
user: UserPage, | |
}; |
OlderNewer