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 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 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 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)
You can’t perform that action at this time.