Skip to content

Instantly share code, notes, and snippets.

libbymiller

Block or report user

Report or block libbymiller

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View dpms_onoff.cpp
// c++ -lX11 -L/usr/lib/arm-linux-gnueabihf/libX11.so.6 -lXext dpms_onoff.cpp -o dpms_onoff
// stolen pieces from http://www.karlrunge.com/x11vnc/blockdpy.c
// and also https://github.com/danfuzz/xscreensaver/blob/master/driver/dpms.c
//expected behaviour: turns the screen off then on twice, but actually only does it once
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <memory.h>
#include <unistd.h>
View gist:13f1cd841c5b1b3b7b41
/////////////////////////////////////////////////////////////
// Many source code lines are copied from RaspiVid.c
// Copyright (c) 2012, Broadcom Europe Ltd
//
// Lines have been added by Pierre Raufast - June 2013
// pierre.raufast@gmail.com
// to work with OpenCV 2.3
// visit thinkrpi.wordpress.com
// Enjoy !
// How to do face detection with your Raspberry Pi Camera module and OpenCV
View passport.rb
# see http://en.wikipedia.org/wiki/Machine-readable_passport
def checksum(str)
arr = str.split("")
count = 1
result = 0
arr.each do |n|
num = nil
factor = 0
if(count%3==1)
@libbymiller
libbymiller / test_flickraw.rb
Created Feb 7, 2016
flickr download script with flickraw
View test_flickraw.rb
require 'flickraw'
require 'pp'
FlickRaw.api_key="xxx"
FlickRaw.shared_secret="xxx"
flickr.access_token = "xxx"
flickr.access_secret = "xxx"
login = flickr.test.login
View keybase.md

Keybase proof

I hereby claim:

  • I am libbymiller on github.
  • I am nicecupoftea (https://keybase.io/nicecupoftea) on keybase.
  • I have a public key whose fingerprint is 792A 4FED BFA1 2FA7 45CC 6EAB 567E 547D 14ED 4690

To claim this, I am signing this object:

View bt_button.js
// by @dirkx
// Apache 2 license http://www.apache.org/licenses/LICENSE-2.0
// see http://www.byteworks.us/Byte_Works/Blog/Entries/2012/8/20_Controlling_Bluetooth_LE_Devices_with_techBASIC.html
// you may need to fiddle with lines 20 and 25 - alternatives are given!
"use strict";
var noble = require('noble');
View test2.js
var radiodan = require('radiodan-client');
radiodan.create().player.discover().then(function(players) {
console.log(players); // [ playerObjects ]
});
View test1
var radiodan = require('radiodan-client').create;
radiodan.player.discover().then(function(players) {
console.log(players); // [ playerObjects ]
});
View radiodan_logs_no_audio.txt
# using a B+ and the default skeleton app I get no startup audio on a B+.
# pi 2 works perfectly.
# I can control audio from the webpage fine.
# This is what I did:
diskutil list
diskutil unmountDisk /dev/disk2
sudo dd bs=1m if=~/Downloads/2016-02-26-raspbian-jessie.img of=/dev/rdisk2
Put it in the Pi, login, expand the filesystem, reboot and login again.
@libbymiller
libbymiller / petey-pi.md
Last active Apr 22, 2016
Petey autostarted with supervisor on a Pi B+ with physical buttons and wifi enabled.
View petey-pi.md

install the wifi stuff

git clone https://github.com/radiodan/provision
cd provision
sudo ./provision node

git fetch origin
git checkout -b minimal origin/minimal

sudo apt-get install libv8-dev -y
You can’t perform that action at this time.