Install Python
$ brew install readline sqlite gdbm
$ brew install python --universal --framework
$ python --version
Python 2.7
Symlinks...
| # /etc/init.d/dropbox | |
| ### BEGIN INIT INFO | |
| # Provides: dropbox | |
| # Required-Start: $network $syslog $remote_fs | |
| # Required-Stop: $network $syslog $remote_fs | |
| # Should-Start: $named $time | |
| # Should-Stop: $named $time | |
| # Default-Start: 2 3 4 5 | |
| # Default-Stop: 0 1 6 | |
| # Short-Description: Start and stop the dropbox daemon for debian/ubuntu |
| /* | |
| * Fabrizio Calderan, twitter @fcalderan, 2010.11.02 | |
| * I had an idea: could Inception movie be explained by a few javascript closures | |
| * and variable resolution scope (just for fun)? | |
| * | |
| * Activate javascript console =) | |
| */ | |
| <script> | |
| console.group("inception movie"); |
| BEGIN { | |
| require 'net/http' | |
| Net::HTTP.module_eval do | |
| alias_method '__initialize__', 'initialize' | |
| def initialize(*args,&block) | |
| __initialize__(*args, &block) |
| def tip(msg); puts; puts msg; puts "-"*100; end | |
| # | |
| # 30 Ruby 1.9 Tips, Tricks & Features: | |
| # http://www.igvita.com/2011/02/03/new-ruby-19-features-tips-tricks/ | |
| # | |
| tip "Upgrading to Ruby 1.9 is simple: rvm install 1.9.2 && rvm --default 1.9.2" | |
| tip "Ruby 1.9 supports named captures in regular expressions!" |
| require "base64" | |
| require 'openssl' | |
| require 'iconv' | |
| CIPHER = "aes-256-cbc" | |
| #http://www.ruby-doc.org/ruby-1.9/classes/OpenSSL/PKCS5.html | |
| PASSPHRASE = "12345" | |
| IV = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16].pack("c*") |
| require 'httparty' | |
| require 'will_paginate/collection' | |
| require 'ostruct' | |
| class GoogleCustomSearch | |
| include HTTParty | |
| base_uri 'https://www.googleapis.com/customsearch/v1' | |
| format :json | |
| default_params :cx => 'google-costom-searck-id', :key => 'google-api-key' |
| #!/usr/bin/env ruby | |
| # -*- coding: utf-8 -*- | |
| require 'eventmachine' | |
| class UpdateEvent | |
| include EM::Deferrable | |
| def fire(msg) | |
| p "update: #{msg}" |
| # WAIT! Do consider that `wait` may not be needed. This article describes | |
| # that reasoning. Please read it and make informed decisions. | |
| # https://www.varvet.com/blog/why-wait_until-was-removed-from-capybara/ | |
| # Have you ever had to sleep() in Capybara-WebKit to wait for AJAX and/or CSS animations? | |
| describe 'Modal' do | |
| should 'display login errors' do | |
| visit root_path |
Install Python
$ brew install readline sqlite gdbm
$ brew install python --universal --framework
$ python --version
Python 2.7
Symlinks...
| /** | |
| * dirwatcher.scala | |
| * | |
| * Uses the Java 7 WatchEvent filesystem API from within Scala. | |
| * Adapted from: | |
| * http://download.oracle.com/javase/tutorial/essential/io/examples/WatchDir.java | |
| * | |
| * @author Chris Eberle <[email protected]> | |
| * @version 0.1 | |
| */ |