A small library for padding strings in JavaScript. Marmalade-free.
NOTE: PADDINGTON IS NO LONGER UNDER ACTIVE DEVELOPMENT.
If you're interested in maintaining Paddington, please get in touch via GitHub.
Current Version: 1.0.0
r.db("ScrobbleGraph").table("scrobbles").groupedMapReduce( | |
function(doc) { return doc("date").date() }, | |
function(doc) { return [doc] }, | |
function(left, right) { return left.add(right)} | |
) | |
// It's better to use just an orderBy and group on the client because | |
// - The database won't have to keep everything in memory | |
// - It's faster because of the index |
#!/bin/sh | |
# = About = | |
# This script when run will log details of the current active X11 window. | |
# Useful for logging/graphing how much time is spent in different apps. | |
# = Usage = | |
# If --datetime is present as the first argument, the log line will include the | |
# date and time. | |
# |
#!/usr/bin/env perl | |
use feature 'switch'; | |
use strict; | |
use warnings; | |
use Data::Dumper; | |
use File::Basename; | |
use File::Copy; | |
use File::Path qw/make_path/; |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Leaflet</title> | |
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.3.1/leaflet.css" /> | |
<script src="http://cdn.leafletjs.com/leaflet-0.3.1/leaflet.js"></script> | |
<script src="http://maps.google.com/maps/api/js?v=3.2&sensor=false"></script> | |
<script src="http://matchingnotes.com/javascripts/leaflet-google.js"></script> | |
</head> | |
<body> |
raspivid -o - -t 0 -vf -hf -fps 30 -b 6000000 | ffmpeg -re -ar 44100 -ac 2 -acodec pcm_s16le -f s16le -ac 2 -i /dev/zero -f h264 -i - -vcodec copy -acodec aac -ab 128k -g 50 -strict experimental -f flv rtmp://a.rtmp.youtube.com/live2/<SESSION>
you can tweak -b
and -fps
to your liking. the settings above work well for 1080p. by not specifying width or height we get the full 1920x1080 resolution from the raspi camera
// to compile (using mingw-w64) | |
// g++ this_filename.c -lole32 | |
// outputs current system volume (out of 0-100) to stdout, ex: output "23" | |
// mostly gleaned from examples here: http://msdn.microsoft.com/en-us/library/windows/desktop/dd370839(v=vs.85).aspx | |
// download a compiled version here: | |
// https://sourceforge.net/projects/mplayer-edl/files/adjust_get_current_system_volume_vista_plus.exe.exe (updated, can set it too now!) | |
#include <windows.h> | |
#include <commctrl.h> | |
#include <mmdeviceapi.h> | |
#include <endpointvolume.h> |
function endianness () { | |
var b = new ArrayBuffer(4); | |
var a = new Uint32Array(b); | |
var c = new Uint8Array(b); | |
a[0] = 0xdeadbeef; | |
if (c[0] == 0xef) return 'LE'; | |
if (c[0] == 0xde) return 'BE'; | |
throw new Error('unknown endianness'); | |
} |
/** | |
* Created with IntelliJ IDEA. | |
* User: Alexander <estliberitas> Makarenko | |
* Date: 04.01.13 | |
* Time: 3:25 | |
*/ | |
'use strict'; | |
var fs = require('fs') | |
, net = require('net') |