- Install stud
$ brew install https://raw.github.com/paulnicholson/homebrew/master/Library/Formula/stud.rb
- Download and install the powssl script
$ curl https://gist.githubusercontent.com/paulnicholson/2050941/raw/7e4d2178e3733bed18fdfe737277c3cb72241d39/powssl > ~/bin/powssl
$ chmod +x ~/bin/powssl
- Run powssl to create development certificate and configure stud.
$ powssl
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
/* | |
* Copyright (c) 2010 Tobias Schneider | |
* This script is freely distributable under the terms of the MIT license. | |
*/ | |
(function(){ | |
var UPC_SET = { | |
"3211": '0', | |
"2221": '1', | |
"2122": '2', |
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
# config/initializers/omniauth.rb | |
module OmniAuth | |
module Strategies | |
# tell OmniAuth to load our strategy | |
autoload :Pixelation, 'lib/pixelation_strategy' | |
end | |
end | |
Rails.application.config.middleware.use OmniAuth::Builder do | |
provider :twitter, "app_name", "secret" |
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
;; emacs configuration | |
(push "/usr/local/bin" exec-path) | |
(add-to-list 'load-path "~/.emacs.d") | |
(setq make-backup-files nil) | |
(setq auto-save-default nil) | |
(setq-default tab-width 2) | |
(setq-default indent-tabs-mode nil) | |
(setq inhibit-startup-message t) |
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
;; This are setting for nice tabbar items | |
;; to have an idea of what it looks like http://imgur.com/b0SNN | |
;; inspired by Amit Patel screenshot http://www.emacswiki.org/pics/static/NyanModeWithCustomBackground.png | |
;; Tabbar | |
(require 'tabbar) | |
;; Tabbar settings | |
(set-face-attribute | |
'tabbar-default nil | |
:background "gray20" |
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
var FB = {}; | |
FB.api = function(location, callback){}; | |
FB.getLoginStatus = function(callback){}; | |
FB.init = function(options){}; | |
FB.login = function(callback, scope){}; | |
FB.logout = function(callback){}; | |
FB.Event = {}; | |
FB.Event.subscribe = function(evt, callback){}; |
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
;; paths | |
(if (not (getenv "TERM_PROGRAM")) | |
(let ((path (shell-command-to-string | |
"$SHELL -cl \"printf %s \\\"\\\$PATH\\\"\""))) | |
(setenv "PATH" path) | |
(setq exec-path (split-string path ":")))) | |
;;remove vc-git | |
(setq vc-handled-backends ()) |
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
# Sample implementation of quicksort and mergesort in ruby | |
# Both algorithm sort in O(n * lg(n)) time | |
# Quicksort works inplace, where mergesort works in a new array | |
def quicksort(array, from=0, to=nil) | |
if to == nil | |
# Sort the whole array, by default | |
to = array.count - 1 | |
end |
One of my favorite past times is to look at the notebooks of famous scientists. Da Vinci's notebook is well known, but there plenty others. Worshipping Da Vinci like no other, I bought a Think/Create/Record journal, used it mostly to keep jot down random thoughts and take notes. This was great in the beginning, but the conformity of lines drove me nuts. Only moleskines made blank notebooks, so I had to buy one.
At the same time I started a freelance project. The project itself is irrelevant, but suffice to say it was very complex and spanned several months. It seemed like a perfect opportunity to use the moleskine. Looking back, all my entries fell under few categories:
- Todo
- Question
- Thought
- Bug
- Feature
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
# spec/lib/tasks/notification_rake_spec.rb | |
require 'spec_helper' | |
describe 'notifications:weekly' do | |
include_context "rake" | |
let(:users){ [double(:user)] } | |
let(:user_deliveries){ double(:user_deliveries) } | |
before{ User.stub(:all).and_return( users ) } |
OlderNewer