This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# DESCRIPTION: | |
# | |
# Set the bash prompt according to: | |
# * the ruby version | |
# * the branch/status of the current git repository | |
# * the branch of the current subversion repository | |
# * the return value of the previous command | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var get_pass = function(callback) { | |
console.info("Enter password:") | |
var stdin = process.openStdin() | |
stdin.setEncoding('utf8') | |
var tty = require('tty') | |
tty.setRawMode(true) | |
var password = "" | |
stdin.on("data", function (c) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
You can now sync from svn -> git, using the following commands: | |
git svn fetch | |
git rebase trunk | |
And to sync from git -> svn, use: | |
git svn dcommit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
you need to update your rtmp. | |
I stole this code from LAGMonkey | |
I highly recomend that you login via SSH. | |
first remove any previous packages | |
Code: | |
sudo apt-get purge rtmpdump |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Getting a repository: | |
git svn clone --tags <tags subfolder> --trunk <trunk subfolder> --branches <branches subfolder> | |
Updating SVN-tracking remote branches in git: | |
git svn fetch | |
Working on trunk: | |
git checkout master; git svn rebase | |
Working on a branch for the first time: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.DS_Store | |
*~ | |
*.swp | |
*~.nib | |
build/ | |
*.pbxuser | |
*.perspective | |
*.perspectivev3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import serial | |
import math | |
import datetime | |
from tempodb import Client, DataPoint | |
# Electronic component constants | |
POTENTIAL_DIVIDER_RESISTOR = 10000 | |
THERMISTOR_B_VALUE = 3977 | |
THERMISTOR_REF_TEMP = 298.15 | |
THERMISTOR_REF_RESISTANCE = 10000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
get '/data/?' do | |
content_type :json | |
return [].to_json if (params[:start].nil? or Time.parse(params[:start]).nil?) | |
return [].to_json if (params[:stop].nil? or Time.parse(params[:stop]).nil?) | |
return [].to_json if (params[:step].nil?) | |
client = TempoDB::Client.new(API_KEY, API_SECRET) | |
start = Time.parse params[:start] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Read analog voltage on pin 0 send to serial port every 3 seconds | |
*/ | |
const int analogInPin0 = A0; // Analog input pin | |
int sensorValue0 = 0; | |
void setup() { | |
// initialize serial communications at 9600 bps: | |
Serial.begin(9600); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
buildscript { | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
classpath 'com.android.tools.build:gradle:0.6.+' | |
} | |
} | |
apply plugin: 'android' |
OlderNewer