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
// restart application | |
javascript:(function(){var location = window.location.href;window.location = location + (location.indexOf('?') == -1 ? '?' : '&') + 'restartApplication';})(); | |
// debug application | |
javascript:(function(){var location = window.location.href;window.location = location + (location.indexOf('?') == -1 ? '?' : '&') + 'debug';})(); |
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(bui) { | |
var identifier = 'bui.Observable'; | |
/** | |
* @class | |
* By inheriting from this class you can allow observers. Please note | |
* that you have to add types using the {@link bui.Observable#addType} | |
* function before listener can be added. | |
* | |
* @extends bui.Object |
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
digraph finite_state_machine { | |
rankdir=LR; | |
node [shape = doublecircle]; 1; | |
node [shape = circle] 0; | |
node [shape = plaintext, label = ""]; start; | |
start -> 0 [ label = "start"]; | |
0 -> 1 [ label = "[1-9]" ]; | |
1 -> 1 [ label = "[0-9]" ]; |
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
sudo netstat -taupen | |
sudo tcpdump -i en0 -X -vvv host example.com | |
sudo /lib/ufw/ufw-init start | |
sudo ufw enable | |
jpegtran -copy none -optimize -outfile goal.jpg goal.jpg | |
# Pretty print JSON | |
| python -m json.tool |
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 extend(to, from) { | |
for (var key in from) { | |
if (from.hasOwnProperty(key)) { | |
to[key] = from[key]; | |
} | |
} | |
} | |
function Label() { this.text = ''; }; | |
Label.prototype.setLabel = function(text) { this.text = 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
#!/bin/bash | |
OUT="changesets.json" | |
echo "[" > $OUT | |
hg log | grep "^changeset:" | sed 's/changeset.*:/ "/g' | sed 's/$/",/g' | sed '$s/,$//' >> $OUT | |
echo ']' >> $OUT |
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
// JSFiddle: http://jsfiddle.net/qQk7v/ | |
var addMessage = function(message) { | |
var isWindowScope = window === this, | |
extendedMessage = message + ' (called with window context: ' + isWindowScope + ')', | |
textNode = document.createTextNode(extendedMessage); | |
document.body.appendChild(textNode); | |
}; | |
addMessage('Welcome to: ' + location); | |
// Renders the following in the body: |
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
> "20" - 10 | |
10 | |
> "20" + 10 | |
2010 | |
> "42" == 42 | |
true | |
> undefined == null | |
true | |
> Number.MIN_VALUE + 1 == 1 | |
true |
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
> "42" === 42 | |
false | |
> undefined === null | |
false | |
> 42 === 42.0 | |
true |
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
<script src="http://cdnjs.cloudflare.com/ajax/libs/lodash.js/1.0.0-rc.3/lodash.js"></script> | |
<table id="people"> | |
<thead> | |
<tr> | |
<th>Id</th> | |
<th>Name</th> | |
<th>Email</th> | |
<th>Occupation</th> | |
</tr> | |
</thead> |
OlderNewer