Skip to content

Instantly share code, notes, and snippets.

View jonathanmarvens's full-sized avatar

Jonathan Barronville jonathanmarvens

View GitHub Profile
---
# ^^^ YAML documents must begin with the document separator "---"
#
#### Example docblock, I like to put a descriptive comment at the top of my
#### playbooks.
#
# Overview: Playbook to bootstrap a new host for configuration management.
# Applies to: production
# Description:
# Ensures that a host is configured for management with Ansible.
/*
I've wrapped Makoto Matsumoto and Takuji Nishimura's code in a namespace
so it's better encapsulated. Now you can have multiple random number generators
and they won't stomp all over eachother's state.
If you want to use this as a substitute for Math.random(), use the random()
method like so:
var m = new MersenneTwister();
import java.io.IOException;
import java.io.StringReader;
import java.io.StringWriter;
import java.util.HashMap;
import java.util.Map;
import org.dojotoolkit.json.JSONParser;
import org.dojotoolkit.json.JSONSerializer;
import org.dojotoolkit.rt.v8.V8Exception;
import org.dojotoolkit.rt.v8.V8JavaBridge;
# Initial setup
git clone -o framework -b develop https://github.com/laravel/laravel.git project-name
cd project-name
git checkout --orphan master
git commit -m "Initial commit"
# Pulling changes
git fetch framework
git merge --squash -m "Upgrade Laravel" framework/develop
# Fix merge conflicts if any and commit

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "[email protected]"
Create separate SSH key for your personal account and your company. Named them with different extensions in your .ssh folder. Upload them to your github account and finally create a config file for your SSH
Create a config file in ~/.ssh/
vim config:
# PERSONAL ACCOUNT Github
Host github.com-COOL
HostName github.com
User git
IdentityFile ~/.ssh/id_rsa_COOL
/* See:
http://bit.ly/WhXvb3
for the Traceur */
var foo = [9, 9, 9],
bar = [2, 2, 2],
baz = [1, 1, ...foo, 1, 1, ...bar, 1, 1];
console.log(baz);
/* Output: 1,1,9,9,9,1,1,2,2,2,1,1 */
function ClosurePattern() {
this.someMethod = function someMethod() {
console.log('foo');
}
}
var closurePattern = new ClosurePattern();
@jonathanmarvens
jonathanmarvens / pgm.lex
Created November 28, 2012 07:45 — forked from dwf/pgm.lex
A lexer for portable graymap (PGM) files. Use lex or flex to compile into C code.
/* Scanner that reads in a Portable Graymap (PGM) file.
*
* By David Warde-Farley -- user AT cs dot toronto dot edu (user = dwf)
* Redistributable under the terms of the 3-clause BSD license
* (see http://www.opensource.org/licenses/bsd-license.php for details)
*/
enum { PRE_START, PARSE_START, GOT_X, GOT_Y, GOT_MAX } parserstate
= PRE_START;
@jonathanmarvens
jonathanmarvens / pgm.lex
Created November 28, 2012 07:45 — forked from dwf/pgm.lex
A lexer for portable graymap (PGM) files. Use lex or flex to compile into C code.
/* Scanner that reads in a Portable Graymap (PGM) file.
*
* By David Warde-Farley -- user AT cs dot toronto dot edu (user = dwf)
* Redistributable under the terms of the 3-clause BSD license
* (see http://www.opensource.org/licenses/bsd-license.php for details)
*/
enum { PRE_START, PARSE_START, GOT_X, GOT_Y, GOT_MAX } parserstate
= PRE_START;