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
def get_temps(): | |
client = InfluxDBClient('localhost', 8086, 'root', 'root', 'house_temp') | |
wilma = doRequest('sensor/info', {'id': 1210772}) | |
ute = doRequest('sensor/info', {'id': 2648581}) | |
sovrum = doRequest('sensor/info', {'id': 2613562}) | |
mini = doRequest('sensor/info', {'id': 2613527}) | |
forrad = doRequest('sensor/info', {'id': 2613616}) | |
vardagsrum = doRequest('sensor/info', {'id': 2613316 }) | |
uppe = doRequest('sensor/info', {'id': 2613599}) |
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
require 'net/ping' | |
require 'influxdb' | |
@icmp = Net::Ping::External.new('8.8.8.8') | |
rtary = [] | |
pingfails = 0 | |
repeat = 5 | |
(1..repeat).each do | |
if @icmp.ping |
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
[Punisher, Tournament v3] | |
Centii C-Type Adaptive Nano Plating | |
Imperial Navy Energized Adaptive Nano Membrane | |
Gyrostabilizer II | |
400mm Reinforced Rolled Tungsten Plates I | |
1MN Afterburner II | |
Stasis Webifier II | |
200mm AutoCannon II, Republic Fleet EMP S |
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
[Pilgrim, ninja ratter] | |
Medium Armor Repairer II | |
Damage Control II | |
Armor EM Hardener II | |
Armor Thermic Hardener II | |
Heat Sink II | |
10MN Afterburner II | |
Cap Recharger II | |
Cap Recharger II |
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
using System; | |
using Microsoft.Scripting.Hosting; | |
using IronRuby; | |
namespace IronRubyHostTest | |
{ | |
public class Meh | |
{ | |
public void baz() | |
{ |
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
#!/usr/bin/env ruby | |
# Command line util for acquiring a one-off Twitter OAuth access token | |
# Based on http://blog.beefyapps.com/2010/01/simple-ruby-oauth-with-twitter/ | |
require 'rubygems' | |
require 'oauth' | |
puts <<EOS | |
Set up your application at https://twitter.com/apps/ (as a 'Client' app), |
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
public class Wheels : IWheels | |
{ | |
private readonly OutputPort motorOneDirection; | |
private readonly OutputPort motorTwoDirection; | |
private readonly PWM motorOneSpeed; | |
private readonly PWM motorTwoSpeed; | |
public Wheels(Cpu.Pin motorOneDirectionPin, Cpu.Pin motorOneSpeedPin, | |
Cpu.Pin motorTwoDirectionPin, Cpu.Pin motorTwoSpeedPin) |
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
#include "LPD8806.h" | |
#include "SPI.h" | |
// code revision for my version of http://www.youtube.com/watch?v=IUhEINPraN8&feature=youtu.be | |
int aX = 0; | |
int aY = 1; | |
int aZ = 3; | |
int stripDataPin = 2; |
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
using System.Linq; | |
namespace Baz | |
{ | |
public class Foo | |
{ | |
public byte[] Bar() | |
{ | |
byte[] b = new byte[] {}; |
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
require 'twitter_oauth' | |
print 'Consumer Key> ' | |
consumer_key = gets.chomp | |
print 'Consumer Secret> ' | |
consumer_secret = gets.chomp | |
t = TwitterOAuth::Client.new( | |
:consumer_key => consumer_key, |
OlderNewer