Skip to content

Instantly share code, notes, and snippets.

View caffo's full-sized avatar

Rodrigo Franco caffo

View GitHub Profile
# ~./mailcap
#
# this uses the view_attachment script found in ~/.bin/view_attachment.sh
#
# this is meant for an OS X system
# MS Excel
# this will use the default xls spreadsheet handler from open
application/x-msexcel; ~/.bin/view_attachment.sh %s
application/ms-exc; ~/.bin/view_attachment.sh %s
# todo: grap topic changes
use strict;
use vars qw($VERSION %IRSSI);
use Irssi;
$VERSION = '0.0.3';
%IRSSI = (
authors => 'Thorsten Leemhuis',
contact => '[email protected]',
#!/bin/sh
## Information
## http://carlo-hamalainen.net/blog/2007/12/11/installing-minion-pro-fonts/
## http://www.ctan.org/tex-archive/fonts/mnsymbol/
## 0.1: Install LCDF Typetools
## http://www.lcdf.org/type/
## If you use Homebrew (http://mxcl.github.com/homebrew/), then uncomment:
# brew install lcdf-typetools
def flash_message
types = { :notice => 'success', :alert => 'error', :info => 'info' }
flash.inject("") do |sum, message|
content_tag :div, :class => "alert alert-#{types[message[0]]}" do
button_tag('×'.html_safe, :type => 'button', :class => 'close', :'data-dismiss' => 'alert', :name => nil) +
message[1]
end
end
end
# OfflineIMAP config for GMail backup (only tested on OS X)
# Save it as ~/.offlineimaprc
# NB: this will sync *everything*, including All Mail, Spam, Bin, etc.
[general]
metadata = ~/.offlineimap
accounts = GMail
maxsyncaccounts = 1
# You might want to change the below to ui = TTY.TTYUI the first time you run offlineimap
# It can choke on large attachments and GMail might reset the connection if you download too much
#!/usr/bin/env ruby
# The script that give you focus!
# Create a text file that contains sites want to give yourself
# access to only during certain times of day.
#
# The file will look like this:
# 12 news.ycombinator.com
# 11-13,19-21 twitter.com
#