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
#host.sh - get ptr record from ip | |
/usr/bin/host $@ |
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
with dm: | |
time docker run -ti ubuntu:latest "w" | |
14:46:30 up 4 days, 1:47, 0 users, load average: 0.51, 0.40, 0.39 | |
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT | |
real 0m1.134s | |
user 0m0.030s | |
sys 0m0.010s |
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 dashboard, queries; | |
// All url parameters are available via the ARGS object | |
var ARGS; | |
// Intialize a skeleton with nothing but a rows array and service object | |
dashboard = { | |
rows : [], | |
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
#!/usr/bin/env python2.7 | |
import docker,sys,os | |
def getsize(path): | |
""" | |
return human readable filesize given path | |
""" | |
try: | |
return e.strerror |
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
test.sh: | |
#!/bin/bash | |
echo ${1} | |
echo ${1:0:1} | |
echo ${1:0:2} | |
echo ${1:0:3} | |
$ ./test.sh tester | |
tester | |
t |
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
import os,json,logging,notify2,socket | |
from slacker import Slacker | |
from time import sleep | |
tokenfile = "~/.slacktoken" | |
token = open(os.path.expanduser(tokenfile), 'r').read().strip('\n') | |
logging.basicConfig(level=logging.DEBUG) | |
log = logging.getLogger() |
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
import os,json,logging,notify2,websocket,requests | |
from time import sleep | |
tokenfile = "~/.slacktoken" | |
token = open(os.path.expanduser(tokenfile), 'r').read().strip('\n') | |
logging.basicConfig(level=logging.DEBUG) | |
log = logging.getLogger() | |
def is_error(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
import os,json,logging | |
from slacker import Slacker | |
tokenfile = "~/work/tsm/.slacktoken" | |
token = open(os.path.expanduser(tokenfile), 'r').read().strip('\n') | |
logging.basicConfig(level=logging.WARN) | |
log = logging.getLogger() | |
slack = Slacker(token) |
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
{ | |
"uaMatch": { | |
"utilities": { | |
"Watch": "SM-V700", | |
"Console": "\\b(Nintendo|Nintendo WiiU|Nintendo 3DS|PLAYSTATION|Xbox)\\b", | |
"MobileBot": "Googlebot-Mobile|YahooSeeker/M1A1-R2D2", | |
"Bot": "Googlebot|YandexBot|bingbot|ia_archiver|AhrefsBot|Ezooms|GSLFbot|WBSearchBot|Twitterbot|TweetmemeBot|Twikle|PaperLiBot|Wotbox|UnwindFetchor|facebookexternalhit", | |
"WebKit": "(webkit)[ /]([\\w.]+)", | |
"TV": "SonyDTV|HbbTV", | |
"DesktopMode": "WPDesktop" |
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
204 2014-10-27T00:00:01 | |
4 2014-10-27T00:00:02 | |
2 2014-10-27T00:00:27 | |
2 2014-10-27T00:00:28 | |
107 2014-10-27T00:01:11 | |
129 2014-10-27T00:01:12 | |
164 2014-10-27T00:01:13 | |
2 2014-10-27T00:02:11 | |
2 2014-10-27T00:02:16 | |
200 2014-10-27T00:03:47 |