This file contains hidden or 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
object Main extends App { | |
val filter = new FooFilter | |
val fooService = new FooService.FinagledService(new FooServiceImpl, new TCompactProtocol.Factory()) // Use the protocol your client uses | |
val httpService: Service[HttpRequest, HttpResponse] = filter andThen fooService | |
val server = Http.serve(":10051", httpService) | |
Await.ready(server) | |
} |
This file contains hidden or 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
function saveObject(request) { | |
// Return 200 and close the connection right away. | |
// The client doesn't need to wait for the DB. | |
request.reply({}).code(200); | |
db.ModelFoo.create(request.params).success(function(record) { | |
// This event gets fired some milliseconds later. | |
// You can chain other business logic here or log success. | |
}); | |
This file contains hidden or 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
function Person(name, age) { | |
this.name = name; | |
this.age = age; | |
} | |
Person.prototype.speak = function () { | |
return "Hello, my name is " + this.name; | |
} | |
Person.prototype.canVote = function() { |
This file contains hidden or 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
autocmd BufWritePost * silent! exec "!curl -d 'filename=" . expand('<afile>') . "' http://domain.com &>/dev/null &" |
This file contains hidden or 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 single line of text is a trigger that tells Vim to run $ source ~/.vimrc when the file is saved | |
autocmd! BufWritePost .vimrc source $MYVIMRC |
This file contains hidden or 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/lib/ruby/1.8/rubygems/format.rb:38:in `from_file_by_path': Cannot load gem at [/var/lib/gems/1.8/cache/daemons-1.1.4.gem] in /home/hudson/workspace/storefront_ds_task (Gem::Exception) | |
from /var/lib/gems/1.8/gems/bundler-1.0.18/lib/bundler/rubygems_integration.rb:100:in `spec_from_gem' | |
from /var/lib/gems/1.8/gems/bundler-1.0.18/lib/bundler/source.rb:77:in `fetch' | |
from /var/lib/gems/1.8/gems/bundler-1.0.18/lib/bundler/installer.rb:50:in `run' | |
from /var/lib/gems/1.8/gems/bundler-1.0.18/lib/bundler/installer.rb:49:in `run' | |
from /var/lib/gems/1.8/gems/bundler-1.0.18/lib/bundler/installer.rb:8:in `install' | |
from /var/lib/gems/1.8/gems/bundler-1.0.18/lib/bundler/cli.rb:220:in `install' | |
from /var/lib/gems/1.8/gems/bundler-1.0.18/lib/bundler/vendor/thor/task.rb:22:in `send' | |
from /var/lib/gems/1.8/gems/bundler-1.0.18/lib/bundler/vendor/thor/task.rb:22:in `run' | |
from /var/lib/gems/1.8/gems/bundler-1.0.18/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task' |
This file contains hidden or 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 | |
############################################################################ | |
# Script to open a directory in TextMate excluding certain directories that | |
# tend to slow down the Find in Project... function. | |
# | |
# Place in an executable loctation with a name of your choosing. | |
# I use `ate' and have it in ~/Local/bin (which has been added to $PATH) | |
############################################################################ |
This file contains hidden or 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
git log <branch1>..<branch2> --author=<pattern> |
This file contains hidden or 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 file is used by Rack-based servers to start the application. | |
require ::File.expand_path('../config/environment', __FILE__) | |
require 'resque/server' | |
run Rack::URLMap.new \ | |
"/" => Mailto::Application, | |
"/resque" => Resque::Server.new |
This file contains hidden or 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
<iframe src="http://www.facebook.com/plugins/like.php?href={{ current_page_url | html_escape }}&layout=standard&show_faces=true&width=450&action=like&colorscheme=light&height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:80px;" allowTransparency="true"></iframe> |
NewerOlder