Skip to content

Instantly share code, notes, and snippets.

View DylanFM's full-sized avatar

Dylan Fogarty-MacDonald DylanFM

View GitHub Profile
class ApplicationController < ActionController::Base
...
#Problem:
#In rails 3.0.1+ it is no longer possible to do this anymore;
# rescue_from ActionController::RoutingError, :with => :render_not_found
#
#The ActionController::RoutingError thrown is not caught by rescue_from.
#The alternative is to to set a catch-all route to catch all unmatched routes and send them to a method which renders an error
#As in http://techoctave.com/c7/posts/36-rails-3-0-rescue-from-routing-error-solution
@zyxar
zyxar / exercise.tour.go
Last active January 15, 2025 06:09
tour.golang exercise solutions
/* Exercise: Loops and Functions #43 */
package main
import (
"fmt"
"math"
)
func Sqrt(x float64) float64 {
z := float64(2.)
source :rubygems
gem "aws-s3", :require => 'aws/s3'
@quamen
quamen / gist:2020715
Created March 12, 2012 08:27
Pizza Dough

Plain dough

Makes 170g dough (enough for one 30 cm pizza)

  • 1 teaspoon dried yeast
  • 1 teaspoon salt
  • 100 ml warm water
  • 2 teaspoons olive oil, plus extra, for greasing
  • 160 g plain (all-purpose) flour, sifted
@jaigouk
jaigouk / meta-tags.md
Created March 8, 2012 18:26 — forked from lancejpollard/meta-tags.md
Complete List of HTML Meta Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta name="keywords" content="your, tags"/>
<meta name="description" content="150 words"/>
<meta name="subject" content="your website's subject">
<meta name="copyright"content="company name">
<meta name="language" content="ES">
@calvincorreli
calvincorreli / mixins.css.scss
Created November 30, 2011 10:25
IE gradient mixin with SCSS/SASS
@mixin gradient($first, $second) {
background-color: $second;
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#{ie-hex-str($first)}', endColorstr='#{ie-hex-str($second)}');";
filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#{ie-hex-str($first)}', endColorstr='#{ie-hex-str($second)}');;
zoom: 1;
background: -webkit-gradient(linear, left top, left bottom, from($first), to($second));
background: -moz-linear-gradient(top, $first, $second);
}

Ramendan

Ponyo Ramen

Find out more about the @ramendan event on their website http://ramendan.com.

Preparation

There is only a few days left, and here is how I prepare myself for Ramendan. First of all, I did some research to find restaurants in Berlin that serve Ramen.

@elithompson
elithompson / dog.coffee
Created July 29, 2011 04:51
Unit testing CoffeeScript with QUnit
class Dog
speak: -> "woof"
legs: 4
@skrings
skrings / LICENSE.txt
Created June 23, 2011 19:17 — forked from 140bytes/LICENSE.txt
140byt.es -- scriptLoader
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@subzey
subzey / LICENSE.txt
Created June 22, 2011 14:43 — forked from 140bytes/LICENSE.txt
parseRoman
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 subzey <[email protected]>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE