Skip to content

Instantly share code, notes, and snippets.

View zapatoche's full-sized avatar

Yannick Schall zapatoche

  • Bish Bash Bosh it
  • London, UK
View GitHub Profile
@zapatoche
zapatoche / tabledisplaytest.html
Created August 26, 2011 13:58 — forked from adactio/tabledisplaytest.html
Content-first table-display test
<!DOCTYPE html>
<html>
<head>
<title>Table Display test</title>
<style>
@media screen and (min-width: 30em) {
body {
display: table;
caption-side: top;
}
@zapatoche
zapatoche / dabblet.css
Created February 23, 2012 11:26 — forked from alexmwalker/dabblet.css
CSS3 Animated Flame *
/**
* CSS3 Animated Flame *
*/
body {background-color:#000}
#logfire {
position:relative;
background:url(http://sitepointstatic.com/examples/css3/animation/logfire.jpg?r=2) center top no-repeat;
height:400px;
margin-top:100px
@zapatoche
zapatoche / responsive-context-images.html
Created March 16, 2012 15:32 — forked from vasilisvg/responsive-context-images.html
Responsive context aware images without cookies or server logic
<!doctype html>
<meta charset="UTF-8">
<title>Client side context aware responsive images</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
.image-container {
width: 50%;
position: relative;
}
.image-container img {
@zapatoche
zapatoche / install.sh
Created April 2, 2012 20:05 — forked from cloud8421/install.sh
Install tmux 1.6 on Ubuntu 10.04
wget -q -O - https://raw.github.com/gist/2204072/install_tmux_1.6_on_ubuntu_10.04.sh | sudo bash
@zapatoche
zapatoche / dabblet.css
Created April 17, 2012 09:41 — forked from LeaVerou/dabblet.css
Vertical centering with Flexbox + margin fallback
/**
* Vertical centering with Flexbox + margin fallback
* Lea Verou & David Storey
*/
html, body { height: 100%; }
body {
width: 100%; /* needed for FF */
margin: 0;
@zapatoche
zapatoche / install.sh
Created April 21, 2012 11:38 — forked from cloud8421/install.sh
Install tmux 1.6 on Ubuntu 10.04
wget -q -O - https://raw.github.com/gist/2204072/install_tmux_1.6_on_ubuntu_10.04.sh | sudo bash
@zapatoche
zapatoche / friendly_urls.markdown
Created April 23, 2012 13:14 — forked from cdmwebs/friendly_urls.markdown
Friendly URLs in Rails

Friendly URLs

By default, Rails applications build URLs based on the primary key -- the id column from the database. Imagine we have a Person model and associated controller. We have a person record for Bob Martin that has id number 6. The URL for his show page would be:

/people/6

But, for aesthetic or SEO purposes, we want Bob's name in the URL. The last segment, the 6 here, is called the "slug". Let's look at a few ways to implement better slugs.

@zapatoche
zapatoche / _media-queries.scss
Created May 14, 2012 18:20 — forked from anthonyshort/_media-queries.scss
Media Queries in Sass
// Media Queries in Sass 3.2
//
// These mixins make media queries a breeze with Sass.
// The media queries from mobile up until desktop all
// trigger at different points along the way
//
// And important point to remember is that and width
// over the portrait width is considered to be part of the
// landscape width. This allows us to capture widths of devices
// that might not fit the dimensions exactly. This means the break
@zapatoche
zapatoche / convert-number-to-word.rb
Created May 21, 2012 17:57 — forked from bzerangue/convert-number-to-word.rb
Convert Number to Word - Sass Function
require 'sass'
## install Linguistics gem, sudo install gem linguistics
require 'linguistics'
Linguistics::use( :en ) # extends Array, String, and Numeric
## this is the linguistics gem,
## instructions on how to use, http://deveiate.org/projects/Linguistics/wiki/English
## 5.en.numwords would output 'five'
@zapatoche
zapatoche / dabblet.css
Created June 7, 2012 11:40 — forked from LeaVerou/dabblet.css
Text masking — The SVG way
/**
* Text masking — The SVG way
*/
svg {
width: 6em; height: 1.5em;
font: 900 500%/1.2 'Arial Black', sans-serif;
}
text { fill: url(#wood); }