Skip to content

Instantly share code, notes, and snippets.

Not actually a bear

Arnaud Berthomier oz

Not actually a bear
Block or report user

Report or block oz

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
oz / backup
Last active Aug 29, 2015 — forked from substack/backup
View backup
tar -cjf- ~/.crypt/passwd ~/.ssh ~/.bashrc ~/.profile ~/.vimrc ~/.gitconfig \
~/.config/chromium ~/.mozilla \
| openssl enc -aes-256-cbc \
| ssh $SERVER 'cat>~/www/backup/`date +%F.%T`'
ssh $SERVER 'ls -1 ~/www/backup | grep ^[0-9] | sort > ~/www/backup/list.txt'
oz /
Created Jun 17, 2009
Quick irc bot that pipes everything it receives on a TCP port to IRC.
#!/usr/bin/env perl
use strict;
use warnings;
use POE qw< Component::Server::TCP Component::IRC >;
# irc config
my @channels = ("#test");
my $irc_nick = 'blop';
my $irc_name = 'blop the bot';
View btscan.rb
# Simple bluetooth scan with IOBluetooth (macruby)
framework 'appkit'
framework 'IOBluetooth'
# IOBluetoothInquiryDelegate
class EventHandler
def deviceInquiryStarted(sender)
puts "Searching for devices..."
# A very straightforward (and ugly :p) translation of mustache.js to
# coffee-script. 'should get faster by using CS's list comprehensions
# too! -- oz
# Generate mustache.js with: with coffee -c
# Then clone janl's mustache.js, and run "rake spec" against the
# generated version.
# Current window object in DOM

Keybase proof

I hereby claim:

  • I am oz on github.
  • I am ephoz ( on keybase.
  • I have a public key whose fingerprint is 2CC4 C75E 9AB8 2328 D7E9 7144 92CC 3FC3 57F0 D893

To claim this, I am signing this object:

oz / pentadactylrc
Created Apr 14, 2011
A few bookmarklets I converted to Pentadactyl commands...
View pentadactylrc
" Bookmark page with
com -nargs=0 pin execute "open " + function(doc) { if(doc.getSelection){s=doc.getSelection();}else{s='';}; return ''+encodeURIComponent(doc.location.href)+'&description='+encodeURIComponent(s)+'&title='+encodeURIComponent(doc.title) }(content.document)
" Read page later with
com -nargs=0 readlater javascript (function(d){var z=d.createElement('scr'+'ipt'),b=d.body;try{if(!b)throw(0);d.title='(Saving...)'+d.title;z.setAttribute('src','');b.appendChild(z);}catch(e){alert('Please wait until the page has loaded.');}void(0)})(content.document)
" Have more? :)
oz / feed.js
Created Mar 6, 2012
Apparently a bug in feedme.js parser events
View feed.js
var http = require('http')
, url = require('url')
, feedme = require('feedme')
, opts = url.parse("");
var parser = new feedme(true);
parser.on('end', function() {
var feed = parser.done();
console.log("Parsing ended... " + feed.title);
oz / hello.c
Created Apr 10, 2012
Tofu example to speak JSON
View hello.c
* A simple Tofu example to speak JSON.
* Compile:
* If you make-installed Tofu, skip the -I/-L flags. If not, export
* TOFU=/wherever/you/git-cloned/and/built/Tofu
* $ gcc hello.c -ltofu -ljansson -I$TOFU/include -L$TOFU/src/.libs -o hello
* Run:
oz / dbus.rb
Created Feb 23, 2013
Detecting screensaver state in Ruby with DBus...
View dbus.rb
#!/usr/bin/env ruby
# encoding: utf-8
require 'time'
require 'dbus'
main =
trap("INT") {
puts "Quitting..."
oz / prowl.go
Created Feb 27, 2013
Quick and dirty Prowl API client in Go. You'd better use prowl libs on github, this is just my backup.
View prowl.go
package main
import (
You can’t perform that action at this time.