Skip to content

Instantly share code, notes, and snippets.

View georgeredinger's full-sized avatar
💭
Coding

George Redinger georgeredinger

💭
Coding
View GitHub Profile
hardware.pin1.configure(ANALOG_IN);
// LED pin config
hardware.pin2.configure(DIGITAL_OUT_OD_PULLUP);
// initially set to off
hardware.pin2.write(0);
/*
If you don't have a Hannah board but want to try the
Cosm.com temperature logging exercise, here it is!
void setup () {
Serial.begin(57600);
Serial.println("\n[lipoVolt]");
}
void loop () {
int millivolt = map(analogRead(6), 0, 1023, 0, 6600);
Serial.println(millivolt);
delay(1000);
}
@georgeredinger
georgeredinger / index.html
Created November 10, 2012 18:43
A CodePen by George Redinger. AikidoSandpoint 1
<div class="outer right">
<div>
Aikido Sandpoint
</div>
</div>
@georgeredinger
georgeredinger / dabblet.css
Created November 10, 2012 18:16 — forked from LeaVerou/markup.html
Illustrating correct & wrong inner border-radius
/**
* Illustrating correct & wrong inner border-radius
*/
.outer {
padding: 10px;
margin: 50px;
border: 1px solid silver;
box-shadow: 0 0 10px gray;
border-radius: 20px;
#!/bin/sh
SOURCE=""
if [ $# -gt 1 ]
then
SOURCE="--source ADF -l 3"
outname=$2
pbreak=$1
@georgeredinger
georgeredinger / tunnels
Created July 31, 2012 21:50
raspberrypi reverse ssh tunnel upstart scripts
pi@raspberrypi ~ $ cat /etc/init/ssh_tunnel.conf
#!upstart
author "george"
description "SSH Tunnel"
start on stopped rc
stop on shutdown
@georgeredinger
georgeredinger / mouse.js
Created July 15, 2012 16:44 — forked from bfncs/mouse.js
Read Linux mouse(s) in node.js
/**
* Read Linux mouse(s) in node.js
* Author: Marc Loehe (marcloehe@gmail.com)
*
* Adapted from Tim Caswell's nice solution to read a linux joystick
* http://nodebits.org/linux-joystick
* https://github.com/nodebits/linux-joystick
*/
var fs = require('fs'),
@georgeredinger
georgeredinger / setup.md
Created June 23, 2012 23:14 — forked from leesmith/setup.md
Ruby on Rails development setup on Ubuntu 12.04 (vim, git, rbenv)

Ruby on Rails development setup on Ubuntu 12.04

System update

# change mirror to ubuntu.osuosl.org first
sudo apt-get update

Install common libraries

sudo apt-get install build-essential libreadline-dev libssl-dev zlib1g-dev libxml2-dev libxslt-dev

@georgeredinger
georgeredinger / Guardfile
Created April 5, 2012 16:36 — forked from drnic/Guardfile
An example Guardfile with the works for a Rails app
guard 'rspec', :version => 2 do
watch(%r{^spec/.+_spec\.rb$})
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
watch('spec/spec_helper.rb') { "spec" }
# Rails example
watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
watch(%r{^app/(.*)(\.erb|\.haml)$}) { |m| "spec/#{m[1]}#{m[2]}_spec.rb" }
watch(%r{^app/controllers/(.+)_(controller)\.rb$}) { |m| ["spec/routing/#{m[1]}_routing_spec.rb", "spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb", "spec/acceptance/#{m[1]}_spec.rb"] }
watch(%r{^spec/support/(.+)\.rb$}) { "spec" }
@georgeredinger
georgeredinger / ubuntu-11.10-gems.erb
Created November 2, 2011 14:21 — forked from kashif/ubuntu-11.10-gems.erb
Chef bootstrap With rvm and ruby 1.9.2 on ubuntu 11.10
bash -c '
<% if knife_config[:bootstrap_proxy] -%>
(
cat <<'EOP'
<%= "proxy = #{knife_config[:bootstrap_proxy]}" %>
EOP
) > ~/.curlrc
<% end -%>
if [ ! -f /usr/bin/chef-client ]; then