Skip to content

Instantly share code, notes, and snippets.

@dgeske
dgeske / hipchat.py
Last active August 29, 2015 14:01 — forked from wsorenson/hipchat.py
Display stats for all users on your HipChat account. Requires requests (http://python-requests.org)
#!/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 March 7, 2013 03:02
CSS Radar - an animated radar built entirely with 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 March 6, 2013 21:29
The first commented line is your dabblet’s title
/**
* 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 March 6, 2013 05:20
CSS Radar - an animated radar built entirely with CSS
/**
* CSS Radar - an animated radar built entirely with CSS
*/
html{
background: black;
min-height: 100%;
text-align: center;
}
@dgeske
dgeske / dabblet.css
Created March 6, 2013 03:51
The first commented line is your dabblet’s title
/**
* 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 March 1, 2013 16:00
Backup All MySQL Databases into Individual Gzipped Files in Current Directory
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 August 9, 2012 04:14
Eclipsify all Play Framework Scala Samples
for f in *; do echo "Processing $f.."; cd $f; play eclipsify; cd ..; done
@dgeske
dgeske / osx hid battery status oneliner
Created February 7, 2012 00:00
GeekTool Bluetooth Keyboard and Magic Mouse Battery Status
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;