Skip to content

Instantly share code, notes, and snippets.

View tharpa's full-sized avatar

Ra Kowalski tharpa

View GitHub Profile
@mrrooijen
mrrooijen / Capistrano-Deployment-Recipe.rb
Created July 29, 2009 09:34
a "base" Capistrano Rails Deployment Recipe. Use it to deploy your Rails application. It is also easily expandable. So feel free to grab this Recipe and add your own tasks/customization!
# Guide
# Configure the essential configurations below and do the following:
#
# Repository Creation:
# cap deploy:repository:create
# git add .
# git commit -am "initial commit"
# git push origin master
#
# Initial Deployment:
@buka
buka / fboauthakka.scala
Created December 30, 2010 05:28
Connecting Facebook OAuth with Akka REST...
/**
* Garrick Evans
* 29 Dec 2010
*/
import akka.http._
import akka.actor._
import net.smartam.leeloo.client._
import net.smartam.leeloo.client.request.OAuthClientRequest
import net.smartam.leeloo.client.response. {OAuthAuthzResponse, GitHubTokenResponse}
@feliperazeek
feliperazeek / PlayHttpServletResponse.java
Created June 18, 2011 23:23
Adapter class to define a HttpServletResponse from a Play Framework Response object
/**
* Copyright 2011 The Apache Software Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@citizen428
citizen428 / ruby_github.rb
Created November 23, 2011 19:33
Create an Atom feed from the new Ruby repos page
require 'open-uri'
require 'nokogiri'
require 'builder'
html = open("https://github.com/languages/Ruby/created")
doc = Nokogiri::HTML.parse(html)
atom = Builder::XmlMarkup.new(:target => STDOUT, :indent => 2)
atom.instruct!
atom.feed "xmlns" => "http://www.w3.org/2005/Atom" do
@uskanda
uskanda / rvm-auto-switch.el
Created November 23, 2011 22:54
[Emacs]Auto RVM switcher (when start up inf-ruby, rails console, webserver)
;; dependency: rvm rinari
(defadvice rinari-web-server (before rvm-switch-rinari-web-server)
(rvm-activate-corresponding-ruby))
(ad-activate 'rinari-web-server)
(defadvice rinari-console (before rvm-switch-rinari-console)
(rvm-activate-corresponding-ruby))
(ad-activate 'rinari-console)
(defadvice run-ruby (before rvm-switch-run-ruby)
@redinger
redinger / Emacs.md
Created November 26, 2011 03:22
Setting up Emacs daemon on OS X

Setting up Emacs daemon on OS X

Tired of waiting for emacs to start on OS X? This step by step guide will teach you how to install the latest version of emacs and configure it to start in the background (daemon mode) and use emacsclient as your main editor.

Install Cocoa Emacs

Download the latest pretest version of [Emacs for Mac OS X]: http://emacsformacosx.com/builds

@wangzaixiang
wangzaixiang / EsperUtil.scala
Created December 12, 2011 03:55
Using Esper with Scala
package demo1
import com.espertech.esper.client.EventBean
import com.espertech.esper.client.EPAdministrator
import com.espertech.esper.client.UpdateListener
import com.espertech.esper.client.EPListenable
import com.espertech.esper.client.EPServiceProvider
object EsperUtil {
@byplayer
byplayer / git ignore ssl verify
Created January 12, 2012 07:31
git ignore ssl verify
export GIT_SSL_NO_VERIFY=true
@PhilHudson
PhilHudson / gist:1883609
Created February 22, 2012 09:34
pretty-lambdas for elisp
(defun pretty-lambdas ()
"Show glyph for lower-case Greek lambda (λ) wherever 'lambda' appears."
(font-lock-add-keywords
nil
`(("(\\(lambda\\>\\)"
(0
(progn
(compose-region
(match-beginning 1)
(match-end 1)
@jrochkind
jrochkind / gist:2161449
Created March 22, 2012 18:40
A Capistrano Rails Guide

A Capistrano Rails Guide

by Jonathan Rochkind, http://bibwild.wordpress.com

why cap?

Capistrano automates pushing out a new version of your application to a deployment location.

I've been writing and deploying Rails apps for a while, but I avoided using Capistrano until recently. I've got a pretty simple one-host deployment, and even though everyone said Capistrano was great, every time I tried to get started I just got snowed under not being able to figure out exactly what I wanted to do, and figured I wasn't having that much trouble doing it "manually".