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
// uncurrying and mixin two-in-one | |
// var a = [1, 2]; | |
// push = factory(Array.prototype.push); | |
// pushA = factory(Array.prototype.push, a); | |
// push(a, 3) => a = [1, 2, 3] | |
// or | |
// pushA(3) => a = [1, 2, 3] | |
var call = Function.call; | |
var slice = Array.prototype.slice; |
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
/* | |
* run it inside Web Inspector, as long as the tab is not closed, | |
* victim's pasteboard is sabotaged. | |
* some some other fun stuff as well :) | |
*/ | |
(function() { | |
var hiddenConsole = (console._commandLineAPI || console._inspectorCommandLineAPI || {}); | |
// randomly fill the paste board | |
var mockPasteboard = function () { |
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
#!/usr/bin/env ruby | |
require 'uri' | |
if ARGV.size != 1 | |
warn "Invalid argument" | |
exit | |
end | |
methods = [] |
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
#!/usr/bin/env bash | |
svncount=`svn status . -q | grep '^M' | wc -l` | |
if [ "$svncount" -gt 0 ] ; then | |
status=`svn status . -q` | |
else | |
status=`git status -s` | |
fi | |
echo $status | awk '/^M/ {print $2}' |
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
set SEGMENT_SEPARATOR '⮀' | |
set SEGMENT_BG | |
set RSTATUS | |
# Create segment of prompt | |
function prompt_segment | |
set -l bg $argv[1] | |
set -l fg $argv[2] | |
[ (count $argv) -gt 2 ]; and set -l content $argv[3..-1] |
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
/* | |
* @name arrayEqual | |
* @description check if two arrays are equal | |
* @param {arr} Array to check | |
* @param {arr} Array to check | |
* @return {Boolean} Boolean, returns true if arrays are the same | |
*/ | |
function arrayEqual(a, b) { |
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> | |
<html> | |
<head> | |
<meta charset='utf-8' /> | |
<meta name="viewport" content="width=device-width,user-scalable=no"> | |
<meta name="viewport" content="width=320"> | |
<meta name='apple-mobile-web-app-capable' content='yes' /> | |
<!-- |
NewerOlder