Skip to content

Instantly share code, notes, and snippets.

View olistik's full-sized avatar

Maurizio De Magnis olistik

View GitHub Profile
@olistik
olistik / gist:3899476
Created October 16, 2012 14:07
Ubuntu 12.04 mac-like
@olistik
olistik / gist:3895166
Created October 15, 2012 20:24
Ubuntu 12.04 - Sublime Text 2 - Preferences -> Settings - User
{
"binary_file_patterns":
[
"*.jpg",
"*.jpeg",
"*.png",
"*.gif",
"*.ttf",
"*.tga",
"*.dds",
@olistik
olistik / gist:3894072
Created October 15, 2012 18:09
Ubuntu 12.04 Terminator config: solarized theme + iTerm2-like key bindings
# place this file in ~/.config/terminator/config
[global_config]
title_transmit_bg_color = "#d30102"
focus = system
[keybindings]
reset_clear = <Ctrl>R
new_tab = <Ctrl>T
split_horiz = <Ctrl><Shift>E
split_vert = <Ctrl>E
close_term = <Ctrl><Shift>W
@olistik
olistik / config
Created October 4, 2012 13:30
terminator config with solarized theme
# place this file in ~/.config/terminator/config
[global_config]
title_transmit_bg_color = "#d30102"
focus = system
[keybindings]
[profiles]
[[default]]
palette = "#073642:#dc322f:#859900:#b58900:#268bd2:#d33682:#2aa198:#eee8d5:#002b36:#cb4b16:#586e75:#657b83:#839496:#6c71c4:#93a1a1:#fdf6e3"
background_color = "#eee8d5"
foreground_color = "#002b36"
@peter
peter / creating-edgerails-app.sh
Created June 30, 2012 21:03
Creating and Deploying an EdgeRails (Rails 4) Application to Heroku
# 0. Make sure you have Ruby 1.9.3 installed, and optionally RVM and PostgreSQL
# 0.2 If you are on the Mac, make sure you have a c compiler by installing XCode Command Line Tools or gcc4.2 with homebrew
# https://github.com/mxcl/homebrew/wiki/Custom-GCC-and-cross-compilers
# 0.5 Make sure you have bundler version ~> 1.2 as Rails depends on it
gem install bundler
# 1. Get edge Rails source (master branch)
git clone https://github.com/rails/rails.git
@sowawa
sowawa / sinachiku.rb
Created June 18, 2012 07:00 — forked from mattn/sinachiku.rb
sinatra on mruby
require 'HTTP'
require 'UV'
module Sinachiku
@routes = { 'GET' => [], 'POST' => [] }
def self.route(method, path, opts, &block)
@routes[method] << [path, opts, block]
end
def self.do(r)
@routes[r.method].each {|path|
@olistik
olistik / hera.rb
Created June 12, 2012 07:29
HEroku RAge: an application template to have instant gratification with both Rails and Heroku
# Usage:
# rails new <app_name> -d postgresql -m https://raw.github.com/gist/2915895/c13055a80c6747d4ad0ef5b650d04c5a99e31dfc/hera.rb
# cd <app_name>
# heroku open
git :init
git add: "."
git commit: "-a -m 'Genesis'"
insert_into_file 'Gemfile', "ruby '1.9.3'\n", after: "source 'https://rubygems.org'\n"
@olistik
olistik / gist:2627011
Last active August 12, 2021 06:39
Ubuntu 12.10 setup (rbenv/RVM, Janus, PostgreSQL)

Ubuntu 12.10 setup (rbenv/RVM, Janus, PostgreSQL)

Basic pre-requisites

  • Some utilities:
sudo apt-get install vim tmux git curl
  • Copy/paste from the command line:
@olistik
olistik / gist:2292864
Created April 3, 2012 15:18
Removes active record from a Rails app
diff --git a/Gemfile b/Gemfile
index fd83475..a4c0255 100644
--- a/Gemfile
+++ b/Gemfile
@@ -5,7 +5,7 @@ gem 'rails', '3.2.3'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
-gem 'sqlite3'
+# gem 'sqlite3'
@erikh
erikh / hack.sh
Created March 31, 2012 07:02 — forked from DAddYE/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#