Skip to content

Instantly share code, notes, and snippets.

@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);
}
<div class="article">
<div class="en-tete">
<h1>Lorem ipsum</h1>
</div>
<div class="contenu">
<p>Lorem ipsum dolor sit amet</p>
</div>
<div class="meta">...</div>
</div>
@jfreyre
jfreyre / index.html
Created March 31, 2015 06:35
Angular | Same directive name but different implementation
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Example - example-example14-production</title>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.4.0-beta.6/angular.min.js"></script>
<script src="script.js"></script>
//
// ViewController.m
//
// Created by Jérome Freyre on 13.04.15.
// Copyright (c) 2015 @jfreyre. All rights reserved.
//
#import "ViewController.h"
#import <AddressBook/AddressBook.h>