Skip to content

Instantly share code, notes, and snippets.

@bchhun
bchhun / monNamespace.js
Created October 27, 2012 19:04
Les alertes javascript, c'est tellement 1999
var monNamespace = function () {
return {
log: function ()
{
if (typeof console !== "undefined")
{
for (var i = 0; i < arguments.length; i++)
{
var arg = arguments[i];
console.log(arg);
var obj = $("#mon_object_id");
obj.click(function() {
console.log("click !");
});
var sameSelector = $("#mon_object_id");
sameSelector.trigger("click");
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>Groupe Harnois</title>
<style type="text/css">
.gris { background:gray; }
.noir { background:black; }
.yellow { background:yellow; }
@bchhun
bchhun / main.css
Created August 7, 2013 13:21
make it blink
blink {
-webkit-animation-name: blink;
-webkit-animation-iteration-count: infinite;
-webkit-animation-timing-function: cubic-bezier(1.0,0,0,1.0);
-webkit-animation-duration: 1s;
}
@bchhun
bchhun / form_field.html
Created October 16, 2013 01:22
Twitter Bootstrapped Django Form
<div class="control-group two-columns {% if field.errors %}warning{% endif %}">
<label
class="control-label {% if field.field.required %}bold{% endif %}"
for="{{ field.auto_id }}">
{{ field.label|safe }}
{{ field.required }}
</label>
<div class="controls">
{{ field }}
@bchhun
bchhun / 0_reuse_code.js
Created November 7, 2013 14:10
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@bchhun
bchhun / SassMeister-input-HTML.html
Created December 12, 2013 19:34
Generated by SassMeister.com.
<div class="row">
<div class="col-xs-12 pz-colorful-header">
du texte...
</div>
<div class="col-xs-4 pz-produit">
<span class="pz-prix">199 $</span>
</div>
<div class="col-xs-4 pz-produit">
<span class="pz-prix">199 $</span>
</div>
@bchhun
bchhun / mocked-console.js
Created January 9, 2014 16:46
Mocked console so that it doesn't break browsers that don't have the console object Comes from https://github.com/h5bp/html5-boilerplate/blob/master/js/plugins.js
// Mocked console
(function() {
var method;
var noop = function () {};
var methods = [
'assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error',
'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log',
'markTimeline', 'profile', 'profileEnd', 'table', 'time', 'timeEnd',
'timeStamp', 'trace', 'warn'
];
@bchhun
bchhun / magie.py
Last active August 29, 2015 13:56
La magie de SQLAlchemy
import os
import inspect
from datetime import datetime
from fabric.colors import red, green
from sqlite3 import dbapi2 as sqlite
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
@bchhun
bchhun / bands
Last active August 29, 2015 14:11
Indie Folk bands
* Bon Iver
* Volcano Choir
* Donovan Woods
* Dan Magan
* The Tallest Man On Earth
* Postdata
* Sufjan Stevens
* Iron & wine