Skip to content

Instantly share code, notes, and snippets.

View Ruff9's full-sized avatar

Rémy Maucourt Ruff9

View GitHub Profile
@jeantil
jeantil / algorithm.sql
Last active May 26, 2020 20:37
Code source d’Admission post-bac
--
-- le code ci-dessous a a été fortement amélioré par un effor collaboratif sur
-- https://github.com/jeantil/admission_post_bac
-- Pull requests, issues et contributions wiki sont les bienvenues.
-- Une partie du code a été rétro analysé a partir de diverses sources cf https://github.com/jeantil/admission_post_bac/wiki
--
FUNCTION gen class alea V1 relatif grp(
o_g_ea_cod_ins IN VARCHAR2,
o_g_ti_cod IN NUMBER,
@dhoelzgen
dhoelzgen / base_controller.rb
Last active October 7, 2021 16:19
CORS in Rails 4 APIs
class API::V1::BaseController < ApplicationController
skip_before_filter :verify_authenticity_token
before_filter :cors_preflight_check
after_filter :cors_set_access_control_headers
def cors_set_access_control_headers
headers['Access-Control-Allow-Origin'] = '*'
headers['Access-Control-Allow-Methods'] = 'POST, GET, PUT, DELETE, OPTIONS'
@RaVbaker
RaVbaker / gist:2967695
Created June 21, 2012 18:44
[HOWTO] Ubuntu 12.04 Ruby on Rails Development Environment

Ubuntu 12.04 Ruby on Rails Development Environment

I haven't set up an install guide for the latest ubuntu release, largely because the last set of instructions worked pretty closely with the latest and greatest Ubuntu, 12.04 Precise Pangolin, however when installing today, I found that there were enough differences in the way that I configure my setup to justify an update, so here it goes. Yes, I'm late to the party, but a quick google search didn't find anything that I felt was as complete for my requirements as my previous install guides, so here I go.

As always with my install guides, I have included here is just about everything you'll need (and then some) to get started with ruby on rails development with Ubuntu 12.04 as a platform. These are my settings and preferences, and this is certainly not the only way of doing things, so keep that in mind.

Step 1: Get the repos ready and run updates.

sudo apt-get update && sudo apt-get upgrade
@JeffreyWay
JeffreyWay / grid.css
Created December 15, 2011 16:34
Simple CSS Grid in Stylus
full_width = 80
columns = 12
gutter = 1
.container
width unit(full_width, '%')
margin auto
overflow hidden
div[class^="grid_"]
@zhengjia
zhengjia / capybara cheat sheet
Created June 7, 2010 01:35
capybara cheat sheet
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')