🏳️🌈
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
| path=$1 | |
| user=$2 | |
| host=$3 | |
| cat $1 | ssh $2@$3 'cat>> ~/.ssh/authorized_keys' |
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
| dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d;/^linux-\(headers\|image\)/!d' | |
| after this command remove the listed packages with: | |
| sudo apt-get -y purge <package> |
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
| ; php options | |
| pid = /var/run/hhvm/pid | |
| ; hhvm specific | |
| hhvm.server.file_socket = /var/run/hhvm/hhvm.sock | |
| hhvm.server.type = fastcgi | |
| hhvm.server.default_document = index.php | |
| hhvm.server.user = www-data |
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
| function bind(fn, context) { | |
| var givenArguments = []; | |
| for (var _i = 2; _i < arguments.length; _i++) { | |
| givenArguments[_i - 2] = arguments[_i]; | |
| } | |
| if (typeof Function.prototype.bind == "function") { | |
| return Function.prototype.bind.apply(fn, Array.prototype.concat.apply([context], givenArguments)); | |
| } |
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
| function getFunctionName(fn) { | |
| if (typeof fn.name === 'string') { | |
| return fn.name; | |
| } | |
| var fnString = fn.toString(); | |
| var firstBracket = fnString.indexOf('('); | |
| return fnString.substr(9, (firstBracket - 9)); | |
| } |
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
| function stacktrace() { | |
| var stack; | |
| function trace(fn) { | |
| return (typeof fn !== 'function') | |
| ? [] | |
| : trace(fn.caller).concat([fn.toString().split('(')[0].substring(9)]); | |
| } | |
| try { |
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
| #!/bin/bash | |
| # Some help from the various places like these. | |
| # http://www.zimuel.it/install-php-7/ | |
| # http://www.hashbangcode.com/blog/compiling-and-installing-php7-ubuntu | |
| # https://gist.github.com/m1st0/1c41b8d0eb42169ce71a | |
| sudo apt-get update | |
| sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password password development' |
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
| function functionArguments(fn) { | |
| if (fn.length > 0) { | |
| var fnString = Function.prototype.toString.call(fn); | |
| var firstIndex = fnString.indexOf('('); | |
| var lastIndex = fnString.indexOf(')'); | |
| if (firstIndex > -1 && lastIndex > firstIndex) { | |
| firstIndex++; | |
| return fnString.substr(firstIndex, lastIndex - firstIndex).replace(/\s+/g, '').split(','); |
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
| function forEach(list, callback) { | |
| var index = -1; | |
| var length = list.length >>> 0; | |
| while (++index < length) { | |
| callback(list[index], index, list); | |
| } | |
| } |
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
| function forEach(list, callback) { | |
| var keys = Object.keys(list); | |
| var index = -1; | |
| var length = keys.length >>> 0; | |
| while (++index < length) { | |
| callback(list[keys[index]], keys[index], list); | |
| } | |
| } |
OlderNewer