View create.gist.test.js
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() { | |
console.log('testing gist create from sublime text'); | |
}()); |
View ActionBarProgressActivity.java
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
package me.unfollowers.droid.ui; | |
import me.unfollowers.droid.R; | |
import android.support.v7.app.ActionBarActivity; | |
import android.view.View; | |
import android.view.ViewGroup; | |
import android.widget.ProgressBar; | |
/** | |
* @author rishabhmhjn |
View viewport_snippet.html
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
<!-- Viewport mobile tag for sensible mobile support --> | |
<meta name="MobileOptimized" content="320" /> | |
<meta http-equiv="cleartype" content="on" /> | |
<meta name="HandheldFriendly" content="True" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" /> |
View TwttrMaxlengthDirective.js
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() { | |
// angular.module('TwttrMaxlengthDirectiveDemo', ['ngMaterial']) | |
// .constant('twttr', twttr) // https://github.com/twitter/twitter-text/tree/master/js | |
// .directive('twttrMaxlength', TwttrMaxlengthDirective); | |
TwttrMaxlengthDirective.$inject = ['$animate', 'twttr']; | |
function TwttrMaxlengthDirective($animate, twttr) { | |
return { |
View ssh.config
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
Host app-nat | |
Hostname app-nat.example.com | |
User app-nat-user | |
IdentityFile ~/.ssh/app-nat-id_rsa | |
Host app-remote | |
ProxyCommand ssh -q app-nat nc app-remote.example.com 22 | |
User app-remote-user | |
IdentityFile ~/.ssh/app-remote-id_rsa |
View Array.myLast.js
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 MyArray = function() { return this; } ; | |
MyArray.prototype = new Array(); | |
MyArray.prototype.constructor = MyArray; // http://stackoverflow.com/a/10430875/842214 | |
Object.defineProperty(MyArray.prototype, 'myLast', (function () { | |
return { | |
configurable : true, | |
enumerable : true, | |
get : function () { | |
return this[this.length - 1]; |
View JS.inheritance.js
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 Person = function () { | |
this.fname = 'douglas'; | |
this.lname = 'crockford'; | |
}; | |
var Student = function() { | |
return this; | |
}; | |
Student.prototype = new Person(); |
View node_install_with_nvm.sh
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
vi ~/.bashrc | |
# [add the following] | |
# ------------------------------------------------------------- | |
. ~/.nvm/nvm.sh && nvm use default | |
# ------------------------------------------------------------- | |
mkdir ~/src | |
cd !$ |
View redis-pool.js
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 redisConfig = { | |
"host" : "localhost", | |
"port" : "6379", | |
"maxConnections" : 10, | |
"minConnections" : 5, | |
"debug" : true | |
} | |
var redis = require("redis"); |
View gist:5965374
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 ItemModel = Backbone.Model.extend({ | |
defaults : { | |
"item_id" : 0, | |
"item_content" : "this is a content" | |
} | |
}); | |
var ItemColl = Backbone.Collection.extend({ |
OlderNewer