Skip to content

Instantly share code, notes, and snippets.

@bchhun
bchhun / CallAVa.js
Last active October 5, 2018 15:05 — forked from valeadami/CallAVa.js
DialogFlow webhook talking to remote API
var express = require("express");
var bodyParser = require("body-parser");
const querystring = require('querystring');
var path = require("path");
const https = require('http');
var session = require('express-session');
var FileStore = require('session-file-store')(session);
var parseurl = require('parseurl');
var fs = require("fs");
var app = express();
@bchhun
bchhun / python3.ps1
Last active July 27, 2018 17:45
Easy Python installation on Windows. Needs to be ran as an administrator within the Powershell command prompt.
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
choco install -y python3;
@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
@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 / 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 / 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 / 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 / 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 / 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;
}
<!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; }