Skip to content

Instantly share code, notes, and snippets.

@dustinrue
dustinrue / gist:1524009
Created December 27, 2011 15:27
Remove old and unused kernels from a Ubuntu/Debian system
dpkg -l linux-* | awk '/^ii/{ print $2}' | grep -v -e `uname -r | cut -f1,2 -d"-"` | grep -e [0-9] | xargs sudo apt-get remove -y
@dustinrue
dustinrue / gist:1877514
Created February 21, 2012 17:18
Magic fix for vmware vcenter over remote desktop and such
keyboard.typematicMinDelay = "2000000"
@dustinrue
dustinrue / gist:1906405
Created February 25, 2012 04:12
Creating an adisk record for avahi
http://www.nexenta.org/projects/6/wiki/AFP_with_TimeMachine
@dustinrue
dustinrue / gist:2707456
Created May 16, 2012 04:36
Custom fonts in iOS apps
http://blog.beefyapps.com/2010/06/custom-fonts-in-ios-4/
@dustinrue
dustinrue / tunnelbroker-net.sh
Created October 20, 2012 14:48 — forked from pklaus/tunnelbroker-net.sh
tunnelbroker.net automatic tunnel IP update and tunnel setup (on Mac OS X)
#!/bin/bash
#### This script is published by Philipp Klaus <philipp.l.klaus@web.de>
#### on <http://blog.philippklaus.de/2011/05/ipv6-6in4-tunnel-via-hurricane-electric-tunnelbroker-net-automatic-ip-update-on-mac-os-x/>
#### It is originally by freese60 and modified by limemonkey.
#### Found on <http://www.tunnelbroker.net/forums/index.php?topic=287.0>
### Uncomment this line to debug the script:
#set -x
@dustinrue
dustinrue / tunnelbroker-net.sh
Created October 20, 2012 14:51 — forked from pklaus/tunnelbroker-net.sh
tunnelbroker.net automatic tunnel IP update and tunnel setup (on Mac OS X)
#!/bin/bash
#### This script is published by Philipp Klaus <philipp.l.klaus@web.de>
#### on <http://blog.philippklaus.de/2011/05/ipv6-6in4-tunnel-via-hurricane-electric-tunnelbroker-net-automatic-ip-update-on-mac-os-x/>
#### It is originally by freese60 and modified by limemonkey.
#### Found on <http://www.tunnelbroker.net/forums/index.php?topic=287.0>
### Uncomment this line to debug the script:
#set -x
@dustinrue
dustinrue / gist:5991686
Created July 13, 2013 18:24
harlem shake at apple store
javascript:(function()%7Bfunction%20c()%7Bvar%20e=document.createElement(%22link%22);e.setAttribute(%22type%22,%22text/css%22);e.setAttribute(%22rel%22,%22stylesheet%22);e.setAttribute(%22href%22,f);e.setAttribute(%22class%22,l);document.body.appendChild(e)%7Dfunction%20h()%7Bvar%20e=document.getElementsByClassName(l);for(var%20t=0;t%3Ce.length;t++)%7Bdocument.body.removeChild(e%5Bt%5D)%7D%7Dfunction%20p()%7Bvar%20e=document.createElement(%22div%22);e.setAttribute(%22class%22,a);document.body.appendChild(e);setTimeout(function()%7Bdocument.body.removeChild(e)%7D,100)%7Dfunction%20d(e)%7Breturn%7Bheight:e.offsetHeight,width:e.offsetWidth%7D%7Dfunction%20v(i)%7Bvar%20s=d(i);return%20s.height%3Ee&&s.height%3Cn&&s.width%3Et&&s.width%3Cr%7Dfunction%20m(e)%7Bvar%20t=e;var%20n=0;while(!!t)%7Bn+=t.offsetTop;t=t.offsetParent%7Dreturn%20n%7Dfunction%20g()%7Bvar%20e=document.documentElement;if(!!window.innerWidth)%7Breturn%20window.innerHeight%7Delse%20if(e&&!isNaN(e.clientHeight))%7Breturn%20e.clientHeight%7Dreturn%200
mkdir -p /opt/minio/data
mkdir /opt/minio/cofig
docker run -d -p 9000:9000 \
--name minio \
-v /opt/minio/data:/data \
-v /opt/minio/config:/root/.minio \
minio/minio server /data
aws ec2 describe-images \
--owners 'aws-marketplace' \
--filters 'Name=product-code,Values=aw0evgkw8e5c1q413zgy5pjce' \
--query 'sort_by(Images, &CreationDate)[-1].[ImageId]' \
--output 'text'
#include <ESP8266WiFi.h>
#include <PubSubClient.h>
#include <DHT.h>
#include <SimpleTimer.h>
#define DHTPIN 2
#define DHTTYPE DHT22
const char* ssid = "ssid";
const char* password = "password";