Skip to content

Instantly share code, notes, and snippets.

@dgeske
dgeske / hipchat.py
Last active Aug 29, 2015 — forked from wsorenson/hipchat.py
Display stats for all users on your HipChat account. Requires requests (http://python-requests.org)
View hipchat.py
#!/usr/bin/env python
# encoding: utf-8
import sys
import os
import requests
import re
# log in on the browser and supply the full cookie sent to HipChat as well as the company domain.
# domain is shown when you are signed into hipchat
@dgeske
dgeske / dabblet.css
Created Mar 7, 2013
CSS Radar - an animated radar built entirely with CSS
View dabblet.css
/**
* CSS Radar - an animated radar built entirely with CSS
*/
html{
background:
radial-gradient(black 15%, transparent 16%) 0 0,
radial-gradient(black 15%, transparent 16%) 8px 8px,
radial-gradient(rgba(255,255,255,.1) 15%, transparent 20%) 0 1px,
radial-gradient(rgba(255,255,255,.1) 15%, transparent 20%) 8px 9px;
@dgeske
dgeske / dabblet.css
Created Mar 6, 2013
The first commented line is your dabblet’s title
View dabblet.css
/**
* The first commented line is your dabblet’s title
*/
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;
@dgeske
dgeske / dabblet.css
Created Mar 6, 2013
CSS Radar - an animated radar built entirely with CSS
View dabblet.css
/**
* CSS Radar - an animated radar built entirely with CSS
*/
html{
background: black;
min-height: 100%;
text-align: center;
}
@dgeske
dgeske / dabblet.css
Created Mar 6, 2013
The first commented line is your dabblet’s title
View dabblet.css
/**
* The first commented line is your dabblet’s title
*/
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;
@dgeske
dgeske / mysqldump-all
Created Mar 1, 2013
Backup All MySQL Databases into Individual Gzipped Files in Current Directory
View mysqldump-all
for db in $(mysql -e 'show databases' -s --skip-column-names); do mysqldump $db | gzip > "$db-$(date +%Y-%m-%d).sql.gz"; done
@dgeske
dgeske / eclipsify-subdirs.sh
Created Aug 9, 2012
Eclipsify all Play Framework Scala Samples
View eclipsify-subdirs.sh
for f in *; do echo "Processing $f.."; cd $f; play eclipsify; cd ..; done
@dgeske
dgeske / osx hid battery status oneliner
Created Feb 7, 2012
GeekTool Bluetooth Keyboard and Magic Mouse Battery Status
View osx hid battery status oneliner
kbatt=`ioreg -c AppleBluetoothHIDKeyboard | grep BatteryPercent | awk -F"=" {'print $2'}` &&
if [ ${#kbatt} -gt 0 ]; then echo "Bluetooth Keyboard: $kbatt%"; fi &&
tbatt=`ioreg -c BNBTrackpadDevice | grep BatteryPercent | tail -1 | awk -F"=" {'print $2'}` &&
if [ ${#tbatt} -gt 0 ]; then echo "Magic Trackpad Battery: $tbatt%"; fi &&
mbatt=`ioreg -c BNBMouseDevice | grep BatteryPercent | tail -1 | awk -F"=" {'print $2'}` &&
if [ ${#mbatt} -gt 0 ]; then echo "Mouse Battery: $mbatt %"; fi;