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
/* | |
compile with: | |
gcc -shared -fPIC fix_umask.c -o fix_umask.so | |
edit /usr/bin/subl to include (fix the path to fix_umask.so if necessary): | |
#!/bin/sh | |
export LD_PRELOAD=/opt/sublime_text/fix_umask.so | |
exec /opt/sublime_text/sublime_text "$@" |
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
<!-- | |
gs | |
A time-saving device for creating getters & setters in PHP classes | |
Based on a snippet originall published by @akrabat: | |
http://akrabat.com/software/sublime-text-2-snippet-for-php-getter-and-setter-generation/ | |
HOW TO USE | |
In your PHP class, simply type the following: |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
REQUEST: | |
{ | |
"forename": "Elliot", | |
"surname": "Wright", | |
"email": "elliot@byng.co", | |
"date_of_birth": "1992-03-18" | |
} | |
RESPONSE: |
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
<?php | |
/** | |
* Sum Interface | |
* | |
* @author Elliot Wright <elliot@byng.co> | |
*/ | |
interface SumInterface | |
{ | |
/** |
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
<?php | |
/** | |
* Sum Interface | |
* | |
* @author Elliot Wright <elliot@byng.co> | |
*/ | |
interface SumInterface | |
{ | |
/** |
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
<?php | |
function fibonacci($n) | |
{ | |
$fib = [0, 1]; | |
for ($i = 1; ($i + 1) < $n; $i++) { | |
$fib[] = $fib[$i] + $fib[$i - 1]; | |
} |
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
-Xms2G | |
-Xmx2G | |
-XX:ReservedCodeCacheSize=500m | |
-ea | |
-Dsun.io.useCanonCaches=false | |
-Djava.net.preferIPv4Stack=true | |
-Djsse.enableSNIExtension=false | |
-XX:+UseCodeCacheFlushing | |
-XX:+UseConcMarkSweepGC | |
-XX:SoftRefLRUPolicyMSPerMB=50 |
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
/** | |
* Indentation! Fun for the masses! | |
*/ | |
// Examples indented for the lines! | |
// Initial: | |
object. | |
method1( |
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 BreakOut = (function() { | |
"use strict"; | |
var defaults { | |
ball: { | |
position: { | |
x: 200, | |
y: 200 | |
}, |
OlderNewer