Skip to content

Instantly share code, notes, and snippets.

View geraudmathe's full-sized avatar

gerry geraudmathe

  • General Assembly
  • London
View GitHub Profile
@schleg
schleg / 01. Gemfile
Created May 26, 2011 17:26
Setup for Devise + Omniauth
gem 'pg'
group :development do
gem 'ruby-debug'
end
gem 'rake', '~> 0.8.7'
gem 'devise'
gem 'oa-oauth', :require => 'omniauth/oauth'
gem 'omniauth'
gem 'haml'
gem 'dynamic_form'
@acdha
acdha / Shell log.sh
Last active March 22, 2016 06:15
Commands needed to create an AWS RDS database parameter group which defaults to Unicode sanity: UTF-8, full collation, etc.
# Mac Homebrew command to install the RDS command-line tools
# Ubuntu users may find https://launchpad.net/~awstools-dev/+archive/awstools/ useful
brew install rds-command-line-tools
rds-create-db-parameter-group mysql-utf8 -f mysql5.1 -d "MySQL 5.1 configured for UTF-8"
rds-modify-db-parameter-group mysql-utf8 \
--parameters="name=character_set_server, value=utf8, method=immediate" \
--parameters="name=character_set_client, value=utf8, method=immediate" \
--parameters="name=character_set_results, value=utf8, method=immediate" \
@funny-falcon
funny-falcon / cache_expanded_load_path.patch
Created December 15, 2011 08:47
Cache expanded_load_patch (patch against ruby-1.9.3-p0)
From 9088356975d13a9a7fbe6832dfd56a8b2ff7b21d Mon Sep 17 00:00:00 2001
From: Sokolov Yura <funny.falcon@gmail.com>
Date: Wed, 18 Jan 2012 14:01:59 +0400
Subject: [PATCH] cached load_path patch
This patch add caching of expanded $LOAD_PATH elements.
It invalidates cache on current directory change and
filesystem encoding change.
---
internal.h | 2 +
@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
#
@schneems
schneems / gist_snippits.rb
Created October 22, 2012 17:10
gist_snippits.rb
require 'json'
## What
# This file takes in a markdown file and converts any [codeblocks](http://daringfireball.net/projects/markdown/syntax#precode)
# into gists, then embeds the gists via JS.
# Watch out for Github rate limiting, via IP, this is not an authenticated request
@tomdale
tomdale / gist:3981133
Last active November 26, 2019 21:19
Ember.js Router API v2

WARNING

This gist is outdated! For the most up-to-date information, please see http://emberjs.com/guides/routing/!

It All Starts With Templates

An Ember application starts with its main template. Put your header, footer, and any other decorative content in application.handlebars.

<header>
@jmtame
jmtame / gist:6458832
Last active March 26, 2018 07:49
ruby blocks and yield explained by a bloc mentor

The following is an explanation of Ruby blocks and yield by another Bloc mentor (Adam Louis) who was trying to explain it to one of his students.

On my very first day programming, if someone asked me for "the sum of the numbers from 1 to 10", I'd have written:

puts 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10

Easy enough.

@xaviershay
xaviershay / build_frontend.sh
Last active December 24, 2015 20:49
SASS + Coffee + Concatenation in prod
#!/bin/bash
set -exo pipefail
BUILD_ENV=$1
if [ `uname` == 'Darwin' ]; then
OSX=1
JSCOMPRESSOR="yuicompressor --type js"
else
OSX=
require 'rspec/autorun'
def letters(a, b)
indexes = b.each_char.map do |letter|
a.each_char.each_with_index.select {|l, _| l == letter }.map {|_, i| i }
end
start = indexes.shift
if indexes.empty?
@alexpchin
alexpchin / What_Is_Rest.md
Created May 8, 2014 09:12
What is REST?

What is REST?

REST stands for Representional State Transfer and is defined on Wikipedia as:

Representational state transfer (REST) is a software architectural style consisting of a coordinated set of architectural constraints applied to components, connectors, and data elements, within a distributed hypermedia system. REST ignores the details of component implementation and protocol syntax in order to focus on the roles of components, the constraints upon their interaction with other components, and their interpretation of significant data elements.

I think the second part of that explanation sounds like it could be quite interesting... but to me that all seems super complicated! So I've decided to try to simplify it for my own understanding. (If I have not understood something in this gist, please TELL ME!)

##Saving & Retrieving information For this section, think of a web application as a piece of software built to help people to store and access information online.