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 | |
tail "$@" | awk ' | |
{matched=0} | |
/INFO:/ {matched=1; print "\033[0;37m" $0 "\033[0m"} # WHITE | |
/NOTICE:/ {matched=1; print "\033[0;36m" $0 "\033[0m"} # CYAN | |
/WARNING:/ {matched=1; print "\033[0;34m" $0 "\033[0m"} # BLUE | |
/ERROR:/ {matched=1; print "\033[0;31m" $0 "\033[0m"} # RED | |
/ALERT:/ {matched=1; print "\033[0;35m" $0 "\033[0m"} # PURPLE | |
matched==0 {print "\033[0;33m" $0 "\033[0m"} # YELLOW |
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
var getAssetPath = function getAssetPath(packageName, assetPath) { | |
assetPath = assetPath || ''; | |
var meteor_root = Npm.require('fs').realpathSync(process.cwd() + '/../'); | |
var assets_folder = meteor_root + '/server/assets/packages/'+packageName.replace(':','_')+'/'+assetPath; | |
return assets_folder; | |
}; |
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
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
. ~/.bashrc | |
mkdir ~/local | |
mkdir ~/node-latest-install | |
cd ~/node-latest-install | |
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
./configure --prefix=~/local | |
make install # ok, fine, this step probably takes more than 30 seconds... | |
curl https://www.npmjs.org/install.sh | sh |
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
console.log( | |
"%c %c %c \n" + | |
"%c %c %c %c \n" + | |
"%c %c \n" + | |
"%c %c %c %c \n" + | |
"%c %c %c \n" + | |
"%c \n" + | |
"%c \n" + | |
"%c \n" + | |
"%c \n", |
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 | |
use Symfony\Component\Console\Input\ArgvInput; | |
use Symfony\Component\Filesystem\Filesystem; | |
use Symfony\Component\Process\Exception\ProcessFailedException; | |
use Symfony\Component\Process\Process; | |
define('NO_RECREATE_DB', (bool) getenv('NO_RECREATE_DB') ?: false); | |
define('CLEAR_CACHE', (bool) getenv('CLEAR_CACHE') ?: true); | |
define('RECREATE_DB', (bool) getenv('RECREATE_DB') ?: false); |
This file has been truncated, but you can view the full file.
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
ETYMOLOGY. | |
(Supplied by a Late Consumptive Usher to a Grammar School) | |
The pale Usher--threadbare in coat, heart, body, and brain; I see him | |
now. He was ever dusting his old lexicons and grammars, with a queer | |
handkerchief, mockingly embellished with all the gay flags of all | |
the known nations of the world. He loved to dust his old grammars; it | |
somehow mildly reminded him of his mortality. |
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 lang="en-US"> | |
<head> | |
<title>Checkbox</title> | |
<style> | |
input[type=checkbox] { | |
display:none; | |
} | |
input[type=checkbox] + label { |
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
/* | |
This demonstrates a task scheduling loop where tasks can send back other tasks to the queue. | |
Program input: a nested list of items that can either be integers, or nested slices: | |
- when it's an integer, wait for 25 - value seconds | |
- when it's a slice, wait for len(slice) seconds, then put back each item in the queue to be processed next | |
waiting time simulates some processing, on which a concurrency limit is applied ( both waiting times share the same | |
limit ). pushing back to the queue should not be blocking. |