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
# Show loadavg when too high | |
set -l load1m (uptime | grep -o '[0-9]\+\.[0-9]\+' | head -n1) | |
set -l load1m_test (math $load1m \* 100 / 1) | |
if test $load1m_test -gt 100 | |
error load $load1m | |
end |
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
# Show disk usage when low | |
set -l du (df / | tail -n1 | sed "s/ */ /g" | cut -d' ' -f 5 | cut -d'%' -f1) | |
if test $du -gt 80 | |
error du $du%% | |
end |
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 _common_section | |
printf $c1 | |
printf $argv[1] | |
printf $c0 | |
printf ":" | |
printf $c2 | |
printf $argv[2] | |
printf $argv[3] | |
printf $c0 | |
printf ", " |
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
from random import randint, random | |
import math | |
class Pos(object): | |
__slots__ = ('x', 'y') | |
def __init__(self, x=0.0, y=0.0): | |
self.x = x | |
self.y = y | |
def __str__(self): | |
return '(%.1f,%.1f)' % (self.x, self.y) |
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 git_branch | |
set -g git_branch (git rev-parse --abbrev-ref HEAD ^ /dev/null) | |
if [ $status -ne 0 ] | |
set -ge git_branch | |
set -g git_dirty_count 0 | |
else | |
set -g git_dirty_count (git status --porcelain | wc -l | sed "s/ //g") | |
end | |
end |
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
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES | |
e53a722096f0 aafd21071b99 /opt/bin/run_all 41 minutes ago Up 28 minutes 127.0.0.1:49251->22/tcp, 127.0.0.1:49252->9200/tcp es-b | |
0208431f9c7b aafd21071b99 /opt/bin/run_all 41 minutes ago Up 28 minutes 127.0.0.1:49249->22/tcp, 127.0.0.1:49250->9200/tcp es-a |
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
void main(void) | |
{ | |
float x,y; | |
float ratio = iResolution.y / iResolution.x; | |
x = gl_FragCoord.x / iResolution.x - 0.5; | |
y = gl_FragCoord.y / iResolution.y * ratio - 0.25; | |
float PI = 3.14159265358979323846264; |
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
root@alice:/# setgenerate true 6 |
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
Verifying myself: My Bitcoin username is +gak. https://onename.io/gak |
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
bitcoin: | |
build: bitcoin | |
command: /run.sh | |
volumes: | |
- "/z/services/data/bitcoin:/.bitcoin" | |
ports: | |
- "8333:8333" | |
nginx: | |
build: docker-nginx |