Skip to content

Instantly share code, notes, and snippets.

View rdamen's full-sized avatar

Ron rdamen

  • The Netherlands
View GitHub Profile
require 'pp'
require 'fileutils'
require 'securerandom'
STORE="/srv/store/mail"
ARCHIVE="/root/archive"
domains = Dir.glob(File.join(STORE, '*/'))
users = []
folders = []
@rdamen
rdamen / Makefile
Created September 22, 2011 06:27
emu8051 makefile
CC = cc
CFLAGS = -I/usr/include -L/usr/lib -lncurses
OBJECTS = core.o disasm.o emu.o logicboard.o mainview.o \
memeditor.o opcodes.o options.o popups.o
all: $(OBJECTS)
$(CC) $(CFLAGS) -o emu8051 $(OBJECTS)
core.o: core.c emu8051.h
disasm.o: disasm.c emu8051.h
@rdamen
rdamen / bkmkd.rb
Created November 20, 2009 23:11
sinatra app for bookmarklets that run stuff
#!/usr/bin/env ruby
# Bookmarklets
Commands = {
:vim => 'mvim -f %s',
:vimtidy => 'curl -s %s | tidy -ib -utf8 -w 0 | mvim -f -',
:browse => '$BROWSER %s',
:store => 'echo %s >> ~/URLZ'
}
@rdamen
rdamen / hookup
Created August 27, 2009 22:00
git hook symlink fun
#!/usr/bin/env ruby
# symlink git hooks
require 'pathname'
@hooks_dir = ARGV.first || 'hooks'
def path(yo)
Pathname.new(File.expand_path(yo))
end
@rdamen
rdamen / README
Created August 4, 2009 20:05 — forked from nakajima/README
(in /home/ron/161488)
Test
- no flash
- default environment is development
- flash in default environment
- flash in production environment
- flash in test environment (FAILED - 1)
1)
@rdamen
rdamen / README
Created August 4, 2009 18:38 — forked from nakajima/README
..F
1)
Rack::Flash::SessionUnavailable in 'Test flash in test environment'
Rack::Flash depends on session middleware.
(eval):3:in `get'
/home/ron/161426/rack-flash spec.rb:30:in `block (2 levels) in <top (required)>'
Finished in 0.0519955609999999 seconds
@rdamen
rdamen / .rtorrent.rc
Created March 28, 2009 07:33
my rtorrent config
# .rtorrent.rc - my rtorrent config
# for more info see:
# http://libtorrent.rakshasa.no/rtorrent/rtorrent.1.html
session = ~/.rtorrent
encryption = allow_incoming,try_outgoing,enable_retry
dht = off
dht_port = 16881
@rdamen
rdamen / wgetconf.rb
Created February 13, 2009 09:41
confreaks downloader
#!/usr/bin/env ruby
require 'nokogiri'
require 'open-uri'
PROGRAMS = '//td/em/a[1]'
FORMATS = '//ul[@class="formatlist"]/li/a'
PRIORITY = {"small" => 0, "normal" => 1, "large" => 2}
def doc(url)
#!/usr/bin/env ruby
# pull all submodules
`git submodule`.each do |sub|
sub.match(/^.\w+\s(.+)\(.+\)$/)
puts "Pulling #{$1}"
`cd #{$1} && git checkout master && git pull`
end
#!/usr/bin/env ruby
# Syler, the symlinking villain
#
# Recursivly symlinks every file from SRC to DST,
# creates corresponding directories if they don't exist.
require 'pathname'
module Syler
extend self