Skip to content

Instantly share code, notes, and snippets.

Avatar

bradley bcicen

View GitHub Profile
View saturation-issue.go
package main
import (
"fmt"
"github.com/teacat/noire"
)
func main() {
hue := 320.0
val := 100.0
View type_switch_test.go
package main
import (
"testing"
)
var (
lastString string
lastNumber int
lastBool bool
View itermcolorsparser.py
from colour import Color
import xml.etree.ElementTree
def import_itermcolors(filename):
ret = {}
for k,v in import_itermcolors_raw(filename).items():
r = v['Red Component']
g = v['Green Component']
b = v['Blue Component']
ret[k] = Color(rgb=(r,g,b))
View gbulkdelete.py
#!usr/bin/python
import os
import email
import imaplib
from operator import itemgetter
username = 'myemail@gmail.com'
password = 'mypass'
imap = imaplib.IMAP4_SSL("imap.gmail.com")
View bash_indirect_variable.sh
#!/bin/bash
a=1 b=2 c=4; for i in a b c; do echo ${!i}; done
View ssh-autocomplete-from-r53.py
#!/usr/bin/env python2.7
import os
import sys
from boto import route53
def fail():
print('Both AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables must be defined')
sys.exit(1)
View handwarmer.py
#!/usr/bin/env python
import signal
from random import randrange
large_dict = {}
def sig_handler(s,f):
pass
def loop():
View test.yml
---
- hosts: localhost
connection: local
gather_facts: False
tasks:
- name: pull repo
git: repo=https://github.com/bcicen/statsquid.git
dest=/tmp/statsquid
register: b
View gist:71e10dfc2d8388a7f4ef
new/etc/nologin
new/lib64/ld-linux-x86-64.so.2
new/etc/apt/sources.list
new/etc/apt/trustdb.gpg
new/etc/shadow
new/etc/shadow-
new/sbin/initctl
new/sbin/start-stop-daemon
new/usr/bin/dpkg
new/usr/bin/dpkg-deb
View gist:56f4792548bf909383ce
>>> import socket
>>> socket.gethostbyaddr('173.194.123.103')
('lga15s49-in-f7.1e100.net', [], ['173.194.123.103'])