(cat banner.txt | lolcat -f | sed -e 's/'$(echo "\033")'/\\033/g' | sed -e 's/^/echo -e "/g' | sed -e 's/$/"/g' > banner.ascii.sh) && source banner.ascii.sh
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 randomToken(length){ | |
const crypto = require("crypto"); | |
let token = ""; | |
for (let i = length >> 2 ; i >= 0 ; i--) token += crypto.randomBytes(4).readUInt32LE().toString(36); | |
return token, token.substr(0,length); | |
} |
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
// https://jsfiddle.net/ezj7nu25/ | |
body {color:#eee;background:#000} | |
a{color:#FFFF00;text-shadow:0 -15px 2.5px transparent,0 15px 2.5px transparent} | |
a:active{color:red !important;text-shadow:0 0 2.5px #FF0000,0 0 2.5px red} | |
a:hover{text-shadow:0 0 2.5px #FFFF00,0 0 2.5px #FFFF00;color:#FFFF00 !important;text-decoration:none;-webkit-transition:all .4s linear 0s;-moz-transition:all .4s linear 0s;-ms-transition:all .4s linear 0s;-o-transition:all .4s linear 0s;transition:all .4s linear 0s} |
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 memoize(f) { | |
return function(...p){ | |
this._cache = this._cache || [] | |
var k = p.join('|') | |
return this._cache[k] || (this._cache[k] = f(...p)) | |
} | |
} | |
*/ |
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
const float lightnessSteps = 4.0; | |
float lightnessStep(float l) { | |
/* Quantize the lightness to one of `lightnessSteps` values */ | |
return floor((0.5 + l * lightnessSteps)) / lightnessSteps; | |
} | |
vec3 dither(vec3 color) { | |
vec3 hsl = rgbToHsl(color); |
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
image: docker:latest | |
# When using dind, it's wise to use the overlayfs driver for | |
# improved performance. | |
variables: | |
DOCKER_DRIVER: overlay | |
GCP_PROJECT_ID: CHANGE-TO-GCP-PROJECT-ID | |
IMAGE_NAME: image_id | |
services: |
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 | |
set +e | |
echo "–––––––––––––––––––––––––––––––––" | |
echo "Caffeina provisioner" | |
echo "–––––––––––––––––––––––––––––––––" | |
echo "We need your password for privileged installation..." | |
sudo -Ei echo 'Thanks.' |
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 using($ns) { | |
static $ns_cache = []; | |
$ns = trim($ns, '\\'); | |
if (empty($ns_cache[$ns])) { | |
return spl_autoload_register($ns_cache[$ns] = function($class) use ($ns) { | |
return class_exists("$ns\\$class", false) && class_alias("$ns\\$class", $class, true); | |
}, true, false); | |
} else return false; |
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 | |
class CLI { | |
const | |
BLACK = "\033[0;30m", | |
DARKGRAY = "\033[1;30m", | |
RED = "\033[0;31m", | |
LIGHTRED = "\033[1;31m", | |
GREEN = "\033[0;32m", | |
LIGHTGREEN = "\033[1;32m", |
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 | |
class RegEx { | |
protected $pattern; | |
public function __construct($pattern){ | |
$this->pattern = $pattern; | |
} | |
public function test($subject, $flags = 0){ |
NewerOlder