Skip to content

Instantly share code, notes, and snippets.

View tsileo's full-sized avatar

Thomas Sileo tsileo

View GitHub Profile
@tsileo
tsileo / postmkvirtualenv
Created July 6, 2012 11:56 — forked from jlesquembre/postmkvirtualenv
Creates a symlink to PyQt libraries when a new virtual environment is created
#!/bin/bash
# This hook is run after a new virtualenv is activated.
# ~/.virtualenvs/postmkvirtualenv
LIBS=( PyQt4 sip.so )
PYTHON_VERSION=python$(python -c "import sys; print (str(sys.version_info[0])+'.'+str(sys.version_info[1]))")
VAR=( $(which -a $PYTHON_VERSION) )
GET_PYTHON_LIB_CMD="from distutils.sysconfig import get_python_lib; print (get_python_lib())"
@tsileo
tsileo / boilerplate.textile
Created June 10, 2012 22:13
Boilerplate code used for github README files.

<< Project Name >>

<< Project description >>

Branch structure for submodules

There are two branches to this repository, master and production, these make it easier to use the same repository for developing as well as for sharing the code as a Git submodule.

The master Branch

@tsileo
tsileo / TempLogger.cpp
Created May 20, 2012 20:35 — forked from biomood/TempLogger.cpp
Arduino and Python Temperature Logger
#include <OneWire.h>
#include <DallasTemperature.h>
// pin setups
int latchPin = 8;
int clockPin = 12;
int dataPin = 11;
int tempPin = 7;
char recMsg = '0';
@tsileo
tsileo / DS3231.cpp
Created May 14, 2012 18:58 — forked from jeje/DS3231.cpp
Modified DS3231 library for compatibility with Arduino 1.0
// DS3231 Class is by Seeed Technology Inc(http://www.seeedstudio.com) and used
// in Seeeduino Stalker v2.1 for battery management(MCU power saving mode)
// & to generate timestamp for data logging. DateTime Class is a modified
// version supporting day-of-week.
// Original DateTime Class and its utility code is by Jean-Claude Wippler at JeeLabs
// http://jeelabs.net/projects/cafe/wiki/RTClib
// Released under MIT License http://opensource.org/licenses/mit-license.php
#include <Wire.h>
@tsileo
tsileo / temp_rh.ino
Created March 20, 2012 22:46 — forked from arduinoboard/temp_rh.ino
The file that is currently on an Arduino Uno with a serial number of CC2B9309F0DG6LL0
#include <OneWire.h>
#define ZeroPercentVoltage 0.8;
float val = 0;
float RH = 0;
float my_room_temperature = 20; //in degrees C !
float max_voltage = 3.27;
OneWire ds(2); // Sensor DS18b20 on pin 2