Skip to content

Instantly share code, notes, and snippets.

View franciso's full-sized avatar
🌎

Francis Ouellet franciso

🌎
View GitHub Profile
@franciso
franciso / setup_ror_mac_osx_10.8.md
Last active December 15, 2015 16:19
Mac OS X 10.8 - Ruby on Rails Installation Guide

How to install Ruby On Rails on Mac OS X - 10.8

This is a minimalit's guide on installing Ruby on Rails on Mac OS X 10.8

Install Apple Developer command line tools

https://developer.apple.com/downloads/

Install rvm

curl -L https://get.rvm.io | bash -s stable

@jlberglund
jlberglund / controllers_helper.rb
Created March 20, 2013 18:15
Returns attributes for a factory with associations
# spec/support/controllers_helper.rb
module ControllersHelper
# Since FactoryGirl.attributes_for excludes associations, use FactoryGirl.build and then
# strip out the protected attributes.
def build_attributes(*args)
build_object = FactoryGirl.build(*args)
build_object.attributes.slice(*build_object.class.accessible_attributes).symbolize_keys
end
end
@brobertsaz
brobertsaz / serversetup.md
Last active July 6, 2020 08:56
Ubuntu 12.04 Ruby, Rails, Nginx, Unicorn

Ubuntu 12.04, Ruby, Rails, Nginx, Unicorn and git-deploy

In the seemlingly endless search for the actual correct and easy way to deploy a Rails app, we have tried several ways. We tried out using Apache2 and running a cluster of Thin servers. With the built in threading of Puma we decided to use it with Nginx.

Server Setup

  • Create new server
  • Login to new server
    • ssh root@IPaddress (you can also use the domain name if you have the DNS setup already)
    • accept the RSA key
@cbumgard
cbumgard / index.js
Created November 15, 2012 02:20
Dynamic config module for node.js apps to simplify managing configurations for different environments. Reads in a config file matching the current NODE_ENV.
// This module loads a config file in the current working directory matching the NODE_ENV variable.
// I.e. either './development.js' or './production.js' based on the process.env.NODE_ENV variable.
// If not set, it defaults to './development.js'.
// Can load custom environment files as well, as long as the NODE_ENV variable matches
// a file in the current directory. E.g. './staging.js'
// Usage: calling code can just require this module, e.g. "var config = require('./config')"
// assuming this file is named "index.js" and lives in a subdirectory named "config" of the app root.
var config
, config_file = './' + (process.env.NODE_ENV ? process.env.NODE_ENV : 'development') + '.js';
@mmalawski
mmalawski / 10.8 Rails Development Environment
Created October 7, 2012 14:20
Mac OSX Mountain Lion guide to installing Ruby,Rails,MySQL,Mon
# Mac OSX Mountain Lion
# Ruby on Rails Development Environment
# RVM
curl -L https://get.rvm.io | bash -s stable && rvm install 1.9.3 && rvm install 1.8.7
echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function' >> ~/.bash_profile
source ~/.bash_profile
# Disable rarely used RDOC
@peternixey
peternixey / securing_rails_updates.md
Created March 5, 2012 13:10
How Homakov hacked GitHub and how to protect your application by Peter Nixey

##How Homakov hacked GitHub and the line of code that could have prevented it


Please note: THIS ARTICLE IS NOT WRITTEN BY THE GITHUB TEAM or in any way associated with them. It's simply hosted as a Gist because the markdown formatting is excellent and far clearer than anything I could manage on my personal Tumblr at peternixey.com.

If you'd like to follow me on twitter my handle is @peternixey


@bbenezech
bbenezech / devise.fr.yml
Created August 18, 2011 09:11
traductions à jour 18 août 2011
fr:
errors:
messages:
not_found: "n'a pas été trouvé(e)"
already_confirmed: "a déjà été validé(e)"
not_locked: "n'était pas verrouillé(e)"
not_saved:
one: "1 erreur a empêché ce(tte) %{resource} d'être sauvegardé(e) :"
other: "%{count} erreurs ont empêché ce(tte) %{resource} d'être sauvegardé(e) :"
devise: