Skip to content

Instantly share code, notes, and snippets.

Verifying that +yohang is my blockchain ID. https://onename.com/yohang

Keybase proof

I hereby claim:

  • I am yohang on github.
  • I am yohang (https://keybase.io/yohang) on keybase.
  • I have a public key whose fingerprint is B7F1 934A 6662 8825 8288 C65B DA85 32F3 21CA 24A3

To claim this, I am signing this object:

@yohang
yohang / pluginize.js
Created October 29, 2012 15:00
jQuery pluginize a Javascript object
/*global jQuery*/
(function($) {
'use strict';
$.pluginize = function(name, constructor) {
// Déclaration du plugin
$.fn[name] = function(option) {
var args = arguments;
return this.each(function() {
@yohang
yohang / varnish.vcl
Created June 15, 2012 15:32
Varnish configuration file - Not working
backend default {
.host = "127.0.0.1";
.port = "80";
}
sub vcl_recv {
set req.http.Surrogate-Capability = "abc=ESI/1.0";
}
sub vcl_fetch {
@yohang
yohang / gist:2036292
Created March 14, 2012 12:59
Silly song
say -v cellos oh This is a silly song silly song silly song this is the silliest song ive ever ever heard So why keep you listening listening listening while you are supposed to work to work to work to work its because i hate my job hate my job hate my job its because i hate my job more than anything else No its because youve no life youve no life youve no life and you better go get one after forwarding this crap
@yohang
yohang / gist:1987600
Created March 6, 2012 17:24
Returns ANYWAY !
<?php
function foo($bar) {
if ($bar) {
return ...;
}
else {
return ...;
}
<?php
use Nekland\FeedBundle\Config as Feed;
/**
* @Feed\Entity(title="le titre", description="test")
* /
class Post
{
/**