Skip to content

Instantly share code, notes, and snippets.

@jfreyre
jfreyre / gist:5371608
Last active December 24, 2020 14:04 — forked from djq/gist:2846196
Install Postgres 9.1, PostGIS 2.0 and pgRouting on a clean Ubuntu 12.04 install
#!/bin/bash
#
# Install Postgres 9.1, PostGIS 2.0.2 and pgRouting on a clean Ubuntu 12.04 install
# updated to PostGIS 2.0.2
# add the ubuntu gis ppa repository
sudo apt-get -y install python-software-properties
sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable
sudo apt-get update
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
<head>
<!-- Le contenu caché -->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Titre de la page</title>
</head>
<body>
<!-- Le contenu visible -->
<h1>Document XHTML 1.0 valide</h1>
@jfreyre
jfreyre / index.html
Created August 13, 2014 13:30
D3.js - Create a custom color scale
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title></title>
<style type="text/css" media="screen">
div {
width:60px;
height: 60px;
@jfreyre
jfreyre / index.html
Last active August 29, 2015 14:05
Simple but nice CSS print
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title></title>
<link rel="stylesheet" href="print.css" />
<style type="text/css" media="screen">
body {
color: red;
@jfreyre
jfreyre / index.html
Created September 18, 2014 08:21
Simple SVG Example
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
<head>
<!-- Le contenu caché -->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
</head>
<body>
<h1>Main Title</h1>
<p>Ceci est un paragraph normal.</p>
start_lvl = 18
end_lvl = 10
start_lvl.downto(end_lvl).each do |current_lvl|
resize_cmd = "convert lvl_#{current_lvl+1}.gif -resize 50% lvl_#{current_lvl}.gif"
puts resize_cmd
output = `#{resize_cmd}`
/*!
* Merge of :
* Bootstrap v3.2.0 (http://getbootstrap.com)
* normalize.css v3.0.1 | MIT License | git.io/normalize
*/
html {
font-family: sans-serif;
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
}
@jfreyre
jfreyre / Assert Lave
Created October 27, 2014 12:37
Laravel Testing
assertArrayHasKey()
assertClassHasAttribute()
assertClassHasStaticAttribute()
assertContains()
assertContainsOnly()
assertContainsOnlyInstancesOf()
assertCount()
assertEmpty()
html {
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%
}
body {
margin: 0;
}
* {
-webkit-box-sizing: border-box;
Storage.prototype.setObject = function(key, value) {
this.setItem(key, JSON.stringify(value));
}
Storage.prototype.getObject = function(key) {
var value = this.getItem(key);
return value && JSON.parse(value);
}