Skip to content

Instantly share code, notes, and snippets.

{ "_id" : ObjectId( "53203555666661072f9f0500" ),
"meter_id" : 1,
"timestamp" : Date( 1394668740000 ),
"wh" : 1247628 }
{
"result" : [
{
"_id" : 22,
"wh" : 1246489
},
{
"_id" : 23,
"wh" : 1247302
},
"result" : [
{
"_id" : {
"year" : 2014,
"month" : 3,
"day" : 11,
"hour" : 23
},
"wh" : 1247628
},
1234136
1234149
1234162
1234175
1234188
1234201
1234214
1234227
1234239
1234252
@ffaerber
ffaerber / Prioritize.rb
Created August 27, 2013 14:45
Prioritize things
positions = %w(
reset_password_mail
registration_mail
welcome_mail
newsletter
)
class Prioritize
def initialize(positions)
positions.each do |position|
@ffaerber
ffaerber / filelist_to_hash.rb
Created April 22, 2012 15:48
filelist to hash
require "awesome_print"
require 'json'
list = [
"compass-config.rb",
"config.yaml",
"content/00_home/00_index.md",
"content/00_home/01_work.md",
"content/01_additional services/00_index.md",
"content/01_additional services/01_writing labs.md",
#include <Servo.h>
#include <SPI.h>
#include <Ethernet.h>
#include <PusherClient.h>
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
PusherClient client;
int ledPin = 13; // LED connected to digital pin 13
Codecs:
D..... = Decoding supported
.E.... = Encoding supported
..V... = Video codec
..A... = Audio codec
..S... = Subtitle codec
...S.. = Supports draw_horiz_band
....D. = Supports direct rendering method 1
.....T = Supports weird frame truncation
------
@ffaerber
ffaerber / asset.js.coffee
Created October 9, 2011 23:53
plupload rails 3.1 coffeescript
$(document).ready ->
uploader = new plupload.Uploader
runtimes : "html5",
browse_button : 'pickfiles',
container: 'container',
max_file_size : '10mb',
url : "/media",
require 'iconv'
require "mp3info"
filename = "Haendel--Messiah - Evry valley--.mp3"
artist = Mp3Info.open(filename, :encoding => 'utf-8').tag.artist
puts artist.inspect