Skip to content

Instantly share code, notes, and snippets.

View milmih's full-sized avatar

Miloš Mihajlović milmih

View GitHub Profile
@milmih
milmih / ApplicationController.rb
Last active August 29, 2015 14:04
Simple ApplicationController stub for RESTful API and usage example
class ApplicationController < ActionController::Base
include ApplicationHelper
before_action :current_user_session, :current_user
rescue_from 'StandardError', 'Exception', 'ActiveRecord::RecordInvalid',
'ActionController::RoutingError', with: :exception_handler
private
@milmih
milmih / rbenv-install.sh
Created August 23, 2014 09:52
Setting rbenv up globally
#!/usr/bin/env bash
if [ "$UID" -ne 0 ]
then echo "Please run this script as root user"
exit
fi
apt-get -y update
apt-get -y upgrade
apt-get -y install build-essential zlib1g-dev libssl-dev libreadline6-dev libyaml-dev git sqlite3 libsqlite3-dev