Skip to content

Instantly share code, notes, and snippets.

Mandatory Commands

  1. git init: Initialize / create a new local repository. (Do this only once)
  2. git remote add origin [url without brackets]: Connect your local repo to an online repo. (Do this only once)
  3. git add .: Add all files to staging area.
  4. git commit -m "first commit": Commit changes with appropriate message.
  5. git push origin master: Send changes to the master branch of your remote repository.
  6. git pull origin master: Fetch and merge changes from the remote repo to your working repo.

Optional Commands

# 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 ->
@dhruvdutt
dhruvdutt / http-response-interceptor.js
Created April 2, 2016 17:11 — forked from idosela/http-response-interceptor.js
Sample code for ng-conf 2014
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)/;
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 ){