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
^(gir 0aa|[a-z](\d[a-z]?|[a-hj-z]\d{1,2})\s\d[a-z]{2})$ |
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
while sleep 1;do tput sc;tput cup 0 $(($(tput cols)-29));date;tput rc;done & |
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
for (var a = 0; a < 1000; a++) { | |
var out = ''; | |
for (var i = 0; i < 1000; i++) { | |
out += "a"; | |
} | |
console.log(out + "\r"); | |
} |
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 window = {}; | |
var contextClass = (window.AudioContext || | |
window.webkitAudioContext || | |
window.mozAudioContext || | |
window.oAudioContext || | |
window.msAudioContext); | |
if (contextClass) { | |
// Web Audio API is available. |
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 getTimeStamp = function GetTimeStamp() { | |
var date = new Date(); | |
return '' + | |
date.getUTCFullYear() + | |
date.getUTCMonth() + | |
date.getUTCDay() + | |
date.getUTCHours() + | |
date.getUTCMinutes() + | |
date.getUTCSeconds() + | |
date.getUTCMilliseconds() |
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 a = "Hello, World!"; | |
var stringPad = function StringPad(string, side, pad, length) { | |
side = side.toLowerCase(); | |
if (string.length === length) { | |
return string; | |
} else { | |
while (string.length < length) { | |
if (side === "left" || side === "start") { | |
string = pad + string; |
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
if [ -z $1 ] | |
then | |
PREFIX='' | |
else | |
PREFIX=/srv/share/sites/"$1"/ | |
fi | |
logPath="$(echo "cat /config/DEV/backend/logPath/text()" | xmllint --nocdata --shell "$PREFIX"conf/config.xml | sed '1d;$d')" | |
tail -fn 3000 "$logPath"/rolling.log |
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
#Search matching directories for a term | |
#e.g. | |
#pwd = /var/www/ | |
#lsgrep public .jpg | |
#Will list all files that contain the term '.jpg' within directories that match 'public' | |
DIRTERM=$1 | |
DIRS=`ls | grep $DIRTERM` | |
TERM=$2 | |
for DIR in $DIRS |
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
Date.prototype.formatDateTime = function(format) { | |
var dateNow = this; | |
var getDayName = function GetShortDay(long) { | |
switch (dateNow.getDay()) { | |
case 1: | |
return long ? "monday":"mon"; | |
case 2: | |
return long ? "tuesday":"tue"; | |
case 3: |
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 | |
/** | |
* @author Blake Payne <ajaypayne@gmail.com> | |
* @version 1.0.0 | |
* Work in progress, will be added to as different methods are | |
* required. | |
* Currently can handle up to 9 digits. | |
*/ | |
/** |
NewerOlder