Skip to content

Instantly share code, notes, and snippets.

View cjthompson's full-sized avatar

Chris Thompson cjthompson

  • Osiris Development
  • Colorado, USA
View GitHub Profile
@dwhacks
dwhacks / Attiny85_watchdog_example.ino
Created December 20, 2013 14:07
Attiny85 Watchdog
/*
* Watchdog Sleep Example
* Demonstrate the Watchdog and Sleep Functions
* LED on digital pin 0
*
* KHM 2008 / Lab3/ Martin Nawrath nawrath@khm.de
* Kunsthochschule fuer Medien Koeln
* Academy of Media Arts Cologne
*
* Modified on 5 Feb 2011 by InsideGadgets (www.insidegadgets.com)
@rcoup
rcoup / rsync_parallel.sh
Created April 10, 2013 21:52
Parallel-ise an rsync transfer when you want multiple concurrent transfers happening,
#!/bin/bash
set -e
# Usage:
# rsync_parallel.sh [--parallel=N] [rsync args...]
#
# Options:
# --parallel=N Use N parallel processes for transfer. Defaults to 10.
#
# Notes:

Boxen uses a bunch of shellscripts to insert itself into your environment on shell load.

These assume a POSIX shell, which fish is not.

Run this script to generate a fish-compatible config file in ~/.config/fish/boxen.fish, which you can source at the end of your ~/.config/fish/config.fish.

@stupergenius
stupergenius / MySQL Dump Tables
Created August 15, 2012 14:10
Bash script that dumps all the tables of a given database, each table to its own file.
#!/bin/bash
if [ "$1" == "" ]; then
echo "Usage: $0 [output-path]"
exit 1
fi
TABLES=`mysql -B -N -e "select TABLE_NAME from information_schema.TABLES where TABLE_SCHEMA='$1'"`
OUT="$2"
@moklett
moklett / openconnect.md
Created July 24, 2012 15:21
OpenConnect VPN on Mac OS X

Unfortunately, the Cisco AnyConnect client for Mac conflicts with Pow. And by "conflicts", I mean it causes a grey-screen-of-death kernel panic anytime you connect to the VPN and Pow is installed.

As an alternative, there is OpenConnect, a command-line client for Cisco's AnyConnect SSL VPN.

Here's how to get it set up on Mac OS X:

  1. OpenConnect can be installed via homebrew:

     brew update
    

brew install openconnect

@esperlu
esperlu / mysql2sqlite.sh
Created April 27, 2011 05:46
MySQL to Sqlite converter
#!/bin/sh
# Converts a mysqldump file into a Sqlite 3 compatible file. It also extracts the MySQL `KEY xxxxx` from the
# CREATE block and create them in separate commands _after_ all the INSERTs.
# Awk is choosen because it's fast and portable. You can use gawk, original awk or even the lightning fast mawk.
# The mysqldump file is traversed only once.
# Usage: $ ./mysql2sqlite mysqldump-opts db-name | sqlite3 database.sqlite
# Example: $ ./mysql2sqlite --no-data -u root -pMySecretPassWord myDbase | sqlite3 database.sqlite