This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# rss_to_ical.rb | |
# | |
# This parses a (specific) rss feed for dates that could be used to form an ical | |
require 'nokogiri' | |
require 'open-uri' | |
require 'time' | |
# Configuration | |
url = "http://melbournepatterns.org/feed/" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# ERB | |
# | |
# <% years = (Date.today.year..Date.today.year + 12).collect %> | |
# <%= f.select( | |
# 'ccexpy', | |
# years.zip(years.collect {|y| y.to_s[-2,2]}), | |
# {}, | |
# { :class => "expirydate" } | |
# ) %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
p = open('/dev/port', 'w') | |
p.sync = true | |
sequence = [ | |
0b00000000, | |
0b00000010, 0b00001010, 0b00101010, | |
0b10101010, | |
0b00101010, 0b00001010, 0b00000010, | |
0b00000000, | |
0b00000001, 0b00000101, 0b00010101, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'open-uri' | |
unless ARGV[0] | |
puts "Usage: #{$0} <stop-id>" | |
exit 0 | |
end | |
# Configuration | |
url = "http://www.tramtracker.com.au/?id=#{ARGV[0]}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>Nested HTML list browser corrections example</title> | |
</head> | |
<body> | |
<!-- | |
This page shows that the browser will correct nested <li> elements to be |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
DATE=`date +%Y%m%d` | |
SDCARD="/media/steve/NIKON D90/DCIM" | |
mkdir -p $DATE/{jpg,raw} | |
find "$SDCARD" -name "*.JPG" -exec mv -v {} "$DATE/jpg" \; | |
find "$SDCARD" -name "*.NEF" -exec mv -v {} "$DATE/raw" \; | |
notify-send "Finished transferring photos!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
################################################################################ | |
# REATTACH or CREATE a session called "bla" | |
screen -xR bla | |
# Send "date" to the session called "bla" | |
screen -S bla -X stuff date |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/bin/ruby | |
require "curses" | |
include Curses | |
begin | |
init_screen | |
crmode | |
x = 0 | |
y = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" A simplified vimrc | |
" Full version available here: | |
" https://github.com/stevenocchipinti/dotvim/blob/master/vimrc | |
" Use Vundle to manage plugins | |
filetype off | |
set rtp+=~/.vim/bundle/vundle/ | |
call vundle#rc() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export PS1="\$(osascript -e 'set Volume 10' && say 'jerk')$PS1" |
OlderNewer