This file contains hidden or 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
alias weemux='tmux -2u attach -t weemux|| tmux-weemux-setup' |
This file contains hidden or 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
# Mousemode alias so the mouse works in WeeChat while running mosh: | |
alias mousemode="perl -E ' print \"\e[?1005h\e[?1002h\" '" | |
# Command function to enable mousemode, get the mosh key and port, lookup the ip for the hostname and set up the mosh-client connection | |
function mosher() { | |
mousemode | |
mosh_string=$(ssh $1 -t mosh-server|grep "MOSH CONNECT") | |
mosh_key=$(echo $mosh_string|cut -d " " -f4) | |
mosh_port=$(echo $mosh_string|cut -d " " -f3) | |
mosh_ip=$(ping -n 1 $1 | grep Pinging | cut -d '[' -f 2|cut -d ']' -f 1) |
This file contains hidden or 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 | |
# encoding: utf-8 | |
require 'rubygems' | |
require 'chronic' | |
require 'date' | |
if ARGV.size > 0 | |
dob = Chronic.parse(ARGV.join(' ')) | |
strings = ['You were', 'you'] | |
else | |
dob = Chronic.parse('01 january 1970 at 20:12 GMT+1') |
This file contains hidden or 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
Quick English translation of http://www.youtube.com/watch?v=ElYwUY60UYw | |
Goddamnthecunt! | |
When I was told | |
that Santa Claus does not really exist, | |
something snapped in my head. | |
Man I got so angry. | |
I started smoking heavy tobacco | |
and became a Satanist. |
This file contains hidden or 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 | |
# encoding: utf-8 | |
require 'fileutils' | |
base_dir = File.join("E:","Filip","Development","icons") | |
suffix = 'fatcow' | |
size = 32 | |
files = Dir.glob(File.join("E:","Filip","Development","icons","fatcow-hosting-icons-3000",'32x32',"*.png")) | |
files.each do |filepath| | |
fn = File.basename(filepath) |
This file contains hidden or 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 | |
# encoding: utf-8 | |
# Favicon Grabber by Filip H.F. "FiXato" Slagter | |
require 'open-uri' | |
require 'nokogiri' | |
require 'fileutils' | |
ICONS_DIR = File.expand_path(File.join("~",'favicons')) | |
favicon_urls = Hash.new{|h,k|h[k] = []} | |
urls = { | |
'wikipedia' => 'http://en.wikipedia.org/wiki/Favicon#HTML5_recommendation_for_icons_in_multiple_sizes', |
This file contains hidden or 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
# If the url is a youtube URL, make sure we query the api instead of the actual page to prevent triggering captcha requests | |
if 'v=' in url and ('youtube.com' in url or 'youtu.be' in url): | |
m = re.search('v=([\w\d_-]+)', url) | |
if m: | |
youtube_id = m.group(1) | |
url = "http://gdata.youtube.com/feeds/api/videos?v=2&q=" + youtube_id + "&max-results=1&fields=entry(title)&prettyprint=false" | |
weechat.prnt("", url) |
This file contains hidden or 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 | |
# encoding: utf-8 | |
require 'yaml' | |
THRESHOLD = 5 | |
lines = `grep -E '[A-Z]:[lL]ine added for ' ~/UnrealIRCd/logs/tkl.log`.split("\n");nil | |
ban_types = [] | |
results = lines.map do |line| | |
if line.match(/\[([^\]]+)\] - (.+) added for (\S+)@(\S+) on (.+) \(from (\S+)( to expire at (.+))?: (.+)\)/) | |
puts "1- #{line}" if $2 == '' || $2 == ' ' | |
ban_types << $2 |
This file contains hidden or 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 | |
# encoding: utf-8 | |
ROMDIRS = [File.expand_path("~/.openMSX/share/systemroms/old/*"),File.expand_path("~/.openMSX/share/systemroms/downloaded/**/*")] | |
TARGETDIR = File.expand_path("~/.openMSX/share/systemroms") | |
SHAREDIR = "~/Development/openmSX/share/" | |
require 'fileutils' | |
sha1s = `grep -hEro '<sha1>([a-f0-9]+)<\/sha1>' #{SHAREDIR}|sed 's/<\\/sha1>//'|sed 's/<sha1>//'|uniq|sort`.split("\n").map{|l|l.strip.downcase}.uniq.sort | |
copied = [] |
This file contains hidden or 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
Found 12 unique SHA1 sums missing: | |
05e9f40bb7bdc46b557d445c717cb84ad75252f6 | |
2c359c979fbfe5c7c3cce90b4593dba4b7cbcd92 | |
383de340910981bc1e8a2acaec8663b020804ba1 | |
47c78981b5ffbb9e8d9c2145f9c2e642ff0e8193 | |
4a55eb07e1ab8b847e230854e2e26e48983982a6 | |
51a1467d73d26c91aab7923e3be66490daaffdee | |
5fa3aa79aeba2c0441f349e78e9a16d9d64422ea | |
8625c6b633d9cca2875e4dc33404fb98653379d7 | |
b43a4be5c754f68dc3ee64eee29d64f30fac2aff |