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
#!/bin/bash | |
if [ "$1" = "--help" ]; then | |
echo "Usage: $0 <skype username> (if omitted, will detect default username)" | |
exit 1 | |
fi | |
if [ -n "$1" ]; then | |
# skype username from arg | |
skype_username="$1" |
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
~/code/rails/fat_free_crm [cloudfuji±|1.9.3p194]$ tane event customer created "{:email => 'cordies@gmail.com'}" | |
{"category"=>"customer", "event"=>"created", "data"=>{:email=>"cordies@gmail.com"}} | |
/home/masha/.rvm/gems/ruby-1.9.3-p194/gems/rest-client-1.6.7/lib/restclient/abstract_response.rb:48:in `return!': 404 Resource Not Found (RestClient::ResourceNotFound) | |
from /home/masha/.rvm/gems/ruby-1.9.3-p194/gems/rest-client-1.6.7/lib/restclient/request.rb:230:in `process_result' | |
from /home/masha/.rvm/gems/ruby-1.9.3-p194/gems/rest-client-1.6.7/lib/restclient/request.rb:178:in `block in transmit' | |
from /home/masha/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/http.rb:745:in `start' | |
from /home/masha/.rvm/gems/ruby-1.9.3-p194/gems/rest-client-1.6.7/lib/restclient/request.rb:172:in `transmit' | |
from /home/masha/.rvm/gems/ruby-1.9.3-p194/gems/rest-client-1.6.7/lib/restclient/request.rb:64:in `execute' | |
from /home/masha/.rvm/gems/ruby-1.9.3-p194/gems/rest-client-1.6.7/lib/restclient/request.rb:33:in `execute' | |
from |
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
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: com/sun/jna/Platform | |
at com.semaphore.os.UIHandlerManager.getSystemUIHandler(UIHandlerManager.java:22) | |
at com.semaphore.TinyUmbrella.<clinit>(TinyUmbrella.java:131) | |
at java.lang.Class.forName0(Native Method) | |
at java.lang.Class.forName(Unknown Source) | |
at com.semaphore.TinyLoader.loadTiny(TinyLoader.java:248) | |
at com.semaphore.TinyLoader.access$000(TinyLoader.java:29) | |
at com.semaphore.TinyLoader$1.run(TinyLoader.java:42) | |
at java.awt.event.InvocationEvent.dispatch(Unknown Source) | |
at java.awt.EventQueue.dispatchEventImpl(Unknown Source) |
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
Failure/Error: Unable to find matching line from backtrace | |
Timeout::Error: | |
Timeout::Error | |
# /home/ndbroadbent/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/protocol.rb:146:in `rescue in rbuf_fill' | |
# /home/ndbroadbent/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/protocol.rb:140:in `rbuf_fill' | |
# /home/ndbroadbent/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/protocol.rb:122:in `readuntil' | |
# /home/ndbroadbent/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/protocol.rb:132:in `readline' | |
# /home/ndbroadbent/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/http.rb:2562:in `read_status_line' | |
# /home/ndbroadbent/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/http.rb:2551:in `read_new' | |
# /home/ndbroadbent/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/http.rb:1319:in `block in transport_request' |
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
require 'fileutils' | |
# Warning: The following deploy task will completely overwrite whatever is currently deployed to Heroku. | |
# The deploy branch is rebased onto master, so the push needs to be forced. | |
desc "Deploy app to Heroku after precompiling assets" | |
task :deploy do | |
deploy_branch = 'heroku' | |
remote = 'heroku' | |
deploy_repo_dir = "tmp/heroku_deploy" |
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
module StaticHelpers | |
def action_for_template(template) | |
File.basename(template).sub(/\.html\.haml$/, '') | |
end | |
end | |
namespace :static do | |
desc "Precompile static pages at public/*.html" | |
task :precompile do | |
include StaticHelpers |
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 was one of the winners of the recent International Obfuscated C Code Contest: http://www.ioccc.org/2012/tromp/hint.html | |
(code at http://www.ioccc.org/2012/tromp/tromp.c) | |
It's a [Binary Lambda Calculus](http://en.wikipedia.org/wiki/Binary_lambda_calculus) implementation, and it's absolutely incredible. I'm no computer scientist, but he wrote a program that can run an implementation of itself in only 29 bytes. | |
One of the example lambda calculus programs was: | |
\a a ((\b b b) (\b \c \d \e d (b b) (\f f c e))) (\b \c c) | |
... which is assembled into the following BLC code: |
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
#!/usr/bin/env ruby | |
# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application. | |
APP_PATH = File.expand_path('../../config/application', __FILE__) | |
require File.expand_path('../../config/boot', __FILE__) | |
# Add --editor option to open generated files in editor | |
# ----------------------------------------------------- | |
module Rails | |
module Generators |
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
# Patch from https://github.com/rails/rails/pull/8862 | |
module ActionDispatch | |
Request.class_eval do | |
# Remove nils from the params hash | |
def deep_munge(hash) | |
hash.each do |k, v| | |
case v | |
when Array |
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
/* | |
* Add hook for jQuery.fn.on function, to manualy call window.Airbrake.captureException() method | |
* for every exception occurred. | |
* | |
* Let function 'f' be binded as an event handler: | |
* | |
* $(window).on 'click', f | |
* | |
* If an exception is occurred inside f's body, it will be catched here | |
* and forwarded to captureException method. |