This file contains hidden or 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
cd /path/to/repo | |
#displays the raw lengths | |
git shortlog | grep -e '^ ' | sed 's/[[:space:]]\+\(.*\)$/\1/' | awk '{print length($0)}' | |
#or a text-based historgam | |
git shortlog | grep -e '^ ' | sed 's/[[:space:]]\+\(.*\)$/\1/' | awk '{lens[length($0)]++;} END {for (len in lens) print len, lens[len] }' | sort -n |
This file contains hidden or 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
<body data-ng-app="myApp"> | |
<div ng-controller="myController">{{data}}</div> | |
</body> |
This file contains hidden or 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 java.rmi.Naming; | |
public class RmiClient { | |
public static void main(String args[]) throws Exception { | |
RmiServerIntf obj = (RmiServerIntf)Naming.lookup("//localhost/RmiServer"); | |
System.out.println(obj.getMessage()); | |
} | |
} |
This file contains hidden or 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
//1. Set up your Mandrill credentials | |
keystone.init({ | |
// ... | |
'mandrill api key': 'YOUR_API_KEY_HERE', | |
// ... | |
'emails': 'templates/emails', | |
}); | |
//or alternatively, you can set the key later | |
keystone.set('mandrill api key', 'YOUR_API_KEY_HERE'); |
This file contains hidden or 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
gulp.task('nodemon', function(cb) { | |
var nodemon = require('gulp-nodemon'); | |
// We use this `called` variable to make sure the callback is only executed once | |
var called = false; | |
return nodemon({ | |
script: 'server.js', | |
watch: ['server.js', 'server/**/*.*'] | |
}) | |
.on('start', function onStart() { |
This file contains hidden or 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 myApp = angular.module('myApp', [], function($interpolateProvider) { | |
$interpolateProvider.startSymbol('[['); | |
$interpolateProvider.endSymbol(']]'); | |
}); |
This file contains hidden or 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
PackageManager pm = getPackageManager(); | |
List<ApplicationInfo> packages = pm.getInstalledApplications(PackageManager.GET_META_DATA); | |
for (ApplicationInfo applicationInfo : packages) { | |
Log.d("test", "App: " + applicationInfo.name + " Package: " + applicationInfo.packageName); | |
try { | |
PackageInfo packageInfo = pm.getPackageInfo(applicationInfo.packageName, PackageManager.GET_PERMISSIONS); | |
//Get Permissions |
This file contains hidden or 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 express = require('express'); | |
var session = require('express-session'); | |
var cookieParser = require('cookie-parser'); | |
var flash = require('connect-flash'); | |
var app = express(); | |
app.use(cookieParser('secret')); | |
app.use(session({cookie: { maxAge: 60000 }})); | |
app.use(flash()); |
This file contains hidden or 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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" | |
"http://www.w3.org/TR/html4/strict.dtd"> | |
<html> | |
<head> | |
<title>PhoneGap Events Example</title> | |
<script type="text/javascript" charset="utf-8" src="phonegap.0.9.5.js"></script> | |
<script type="text/javascript" charset="utf-8" src="tts.js"></script> | |
<script type="text/javascript" charset="utf-8"> |