git clone <repo>
clone the repository specified by ; this is similar to "checkout" in some other version control systems such as Subversion and CVS
Add colors to your ~/.gitconfig file:
| # Written by Brendan O'Connor, brenocon@gmail.com, www.anyall.org | |
| # * Originally written Aug. 2005 | |
| # * Posted to gist.github.com/16173 on Oct. 2008 | |
| # Copyright (c) 2003-2006 Open Source Applications 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 | |
| # |
| # JSON-encoded error and redirect results for Devise controllers. | |
| # This overrides an internal method of Devise, so be careful when updating Devise! | |
| # | |
| # Usage: | |
| # | |
| # class Users::RegistrationsController < Devise::RegistrationsController | |
| # include DeviseJsonAdapter | |
| # end | |
| # | |
| # devise_for :users, :controllers => { :registrations => "users/registrations" } |
| #!/bin/sh | |
| ### BEGIN INIT INFO | |
| # Provides: unicorn | |
| # Required-Start: $local_fs $remote_fs mysql | |
| # Required-Stop: $local_fs $remote_fs | |
| # Default-Start: 2 3 4 5 | |
| # Default-Stop: 0 1 6 | |
| # Short-Description: unicorn initscript | |
| # Description: Unicorn is an HTTP server for Rack application | |
| ### END INIT INFO |
| function get_avatar_from_service(service, userid, size) { | |
| // this return the url that redirects to the according user image/avatar/profile picture | |
| // implemented services: google profiles, facebook, gravatar, twitter, tumblr, default fallback | |
| // for google use get_avatar_from_service('google', profile-name or user-id , size-in-px ) | |
| // for facebook use get_avatar_from_service('facebook', vanity url or user-id , size-in-px or size-as-word ) | |
| // for gravatar use get_avatar_from_service('gravatar', md5 hash email@adress, size-in-px ) | |
| // for twitter use get_avatar_from_service('twitter', username, size-in-px or size-as-word ) | |
| // for tumblr use get_avatar_from_service('tumblr', blog-url, size-in-px ) | |
| // everything else will go to the fallback | |
| // google and gravatar scale the avatar to any site, others will guided to the next best version |
| # As used with CanCan and Devise | |
| class ApplicationController < ActionController::Base | |
| protect_from_forgery | |
| include ErrorResponseActions | |
| rescue_from CanCan::AccessDenied, :with => :authorization_error | |
| rescue_from ActiveRecord::RecordNotFound, :with => :resource_not_found | |
| before_filter :authenticate! |
| class Api::RegistrationsController < Api::BaseController | |
| respond_to :json | |
| def create | |
| user = User.new(params[:user]) | |
| if user.save | |
| render :json=> user.as_json(:auth_token=>user.authentication_token, :email=>user.email), :status=>201 | |
| return | |
| else |
| /* | |
| * This work is free. You can redistribute it and/or modify it under the | |
| * terms of the Do What The Fuck You Want To Public License, Version 2, | |
| * as published by Sam Hocevar. See the COPYING file for more details. | |
| */ | |
| /* | |
| * Easing Functions - inspired from http://gizma.com/easing/ | |
| * only considering the t value for the range [0, 1] => [0, 1] | |
| */ | |
| EasingFunctions = { |
| #server.modules += ( "mod_rewrite") | |
| # Workaround to have a working reverse-proxy that matches an URL does URL rewriting in Ligghtpd. | |
| # | |
| # Ligtthpd 1.4.28 cannot perform both matching and URL rewriting at the same time. | |
| # Therefore we need to define 2 proxies, one does the matching and bounce the request | |
| # to the other one, in charge of rewriting the URL before proxying the request to the target server. | |
| # | |
| # More about this here: | |
| # http://redmine.lighttpd.net/issues/164#note-9 |
| // Media Queries in Sass 3.2 | |
| // | |
| // These mixins make media queries a breeze with Sass. | |
| // The media queries from mobile up until desktop all | |
| // trigger at different points along the way | |
| // | |
| // And important point to remember is that and width | |
| // over the portrait width is considered to be part of the | |
| // landscape width. This allows us to capture widths of devices | |
| // that might not fit the dimensions exactly. This means the break |