Skip to content

Instantly share code, notes, and snippets.

View bcicen's full-sized avatar

bradley bcicen

View GitHub Profile
#host.sh - get ptr record from ip
/usr/bin/host $@
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
@bcicen
bcicen / domaindash.js
Created February 22, 2015 21:47
Kibana Scripted Dashboard
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 : {}
};
#!/usr/bin/env python2.7
import docker,sys,os
def getsize(path):
"""
return human readable filesize given path
"""
try:
return e.strerror
test.sh:
#!/bin/bash
echo ${1}
echo ${1:0:1}
echo ${1:0:2}
echo ${1:0:3}
$ ./test.sh tester
tester
t
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()
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):
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)
{
"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"
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