Skip to content

Instantly share code, notes, and snippets.

View intinig's full-sized avatar

Giovanni Intini intinig

View GitHub Profile
@intinig
intinig / quiz.rb
Created May 15, 2009 16:59 — forked from ryanb/quiz.rb
# COMMUNITY CHALLENGE
#
# How would you test this Quiz#problem method? No mocks/stubs allowed.
class Quiz
def initialize(input = STDIN, output = STDOUT)
@input = input
@output = output
end
def problem
#!/usr/bin/env ruby
require 'mail'
# source = 'archives/2005-11.txt'
# month = 11
# year = 2005
#
# system "perl -ne 'if(/^From /){open F,\">eml/msg-#{year}-#{month}-\".++$m.\".eml\"}print F' #{source}"
@intinig
intinig / .emacs
Created July 6, 2011 09:58
My .emacs
(tool-bar-mode -1)
(add-to-list 'load-path "~/.emacs.d/vendor/")
(require 'textmate)
(require 'peepopen)
(textmate-mode)
(require 'yaml-mode)
(add-to-list 'auto-mode-alist '("\\.yml$" . yaml-mode))
(add-to-list 'load-path "~/.emacs.d/el-get/el-get")
(unless (require 'el-get nil t)
(url-retrieve
"https://github.com/dimitri/el-get/raw/master/el-get-install.el"
(lambda (s)
(end-of-buffer)
(eval-print-last-sexp))))
(setq el-get-sources
'((:name textmate
:type git
:url "https://github.com/defunkt/textmate.el.git"
:features textmate
:after (lambda() (textmate-mode)))
magit
autopair
color-theme
color-theme-solarized
(if (fboundp 'tool-bar-mode) (tool-bar-mode -1))
;;
;; This is the original stuff
;;
(add-to-list 'load-path "~/.emacs.d/vendor/")
;; sets the default font to menlo
(defun fontify-frame (frame)
<!DOCTYPE html>
<html>
<head>
<title>Test Video, darling</title>
</head>
<body>
<p>Test Video</p>
<video autoplay controls>
<source src="http://hdflash.prada.com/fashion_shows_fw11/videos/fw11_woman.mp4" type="video/mp4" />
</video>
#!/usr/bin/env ruby
puts ARGV.inspect
#!/usr/bin/env ruby
system "open #{ARGV.first.split("\r")[0]}"
#!/usr/bin/env ruby
ARGV.each do |arg|
system "open #{arg.split("\r")[0]}"
end