Skip to content

Instantly share code, notes, and snippets.

View chamberlainpi's full-sized avatar

Pierre Chamberlain chamberlainpi

View GitHub Profile
@jarkkosyrjala
jarkkosyrjala / Enabler.d.ts
Created September 3, 2015 08:55
TypeScript Type Definitions for Building Ads with DoubleClick Studio HTML5 SDK.
// Type definitions for building ads with DoubleClick Studio HTML5 SDK.
// Project: https://www.doubleclickbygoogle.com/solutions/digital-marketing/creative-solutions/
// Definitions by: Jarkko Syrjälä <https://github.com/jarkkosyrjala>
// SDK javascript documentation https://www.google.com/doubleclick/studio/docs/sdk/html5/en/namespace_studio.html
declare module studio {
export class Enabler {
constructor(useSingletonGetter:number);
static getInstance():studio.Enabler;
@DanielSWolf
DanielSWolf / Program.cs
Last active June 13, 2024 17:26
Console progress bar. Code is under the MIT License: http://opensource.org/licenses/MIT
using System;
using System.Threading;
static class Program {
static void Main() {
Console.Write("Performing some task... ");
using (var progress = new ProgressBar()) {
for (int i = 0; i <= 100; i++) {
progress.Report((double) i / 100);
@hamaluik
hamaluik / !Profiler.hx
Last active April 6, 2020 23:11
Simple Haxe Profiler
package ;
import haxe.ds.StringMap;
import haxe.macro.Context;
import haxe.macro.Expr;
import haxe.macro.Printer;
import haxe.macro.Type.ClassType;
import neko.Lib;
using haxe.macro.ExprTools;
@blixt
blixt / prng.js
Last active January 14, 2024 07:01
A very simple, seedable JavaScript PRNG. NOTE: Please read comments on why this is not a good choice.
// NOTICE 2020-04-18
// Please see the comments below about why this is not a great PRNG.
// Read summary by @bryc here:
// https://github.com/bryc/code/blob/master/jshash/PRNGs.md
// Have a look at js-arbit which uses Alea:
// https://github.com/blixt/js-arbit
/**
@stoyanvi
stoyanvi / max_width_email_template.html
Last active December 11, 2017 15:15
HTML Email Template: max-width hack for MS Outlook
<!--[if (gte mso 9)|(IE)]>
<center>
<table>
<tr>
<td width="600">
<![endif]-->
<div style="max-width: 600px; margin: 0 auto;">
<p>This text will be centered and constrained to 600 pixels even on Outlook which does not support max-width CSS</p>
</div>
<!--[if mso]>
@steverichey
steverichey / DontMovePreloader
Created December 18, 2013 18:23
Custom Preloader for HaxeFlixel, used in Don't Move
package;
import flash.Lib;
import flash.display.Bitmap;
import flash.display.BitmapData;
import flixel.system.FlxPreloader;
import flash.events.Event;
import flash.display.StageAlign;
import flash.display.StageScaleMode;
@rxaviers
rxaviers / gist:7360908
Last active June 17, 2024 18:58
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
# Redis configuration file example
# Note on units: when memory size is needed, it is possible to specify
# it in the usual form of 1k 5GB 4M and so forth:
#
# 1k => 1000 bytes
# 1kb => 1024 bytes
# 1m => 1000000 bytes
# 1mb => 1024*1024 bytes
# 1g => 1000000000 bytes
@klovadis
klovadis / gist:2549131
Created April 29, 2012 10:03
How to use optional arguments in node.js
// example function where arguments 2 and 3 are optional
function example( err, optionalA, optionalB, callback ) {
// retrieve arguments as array
var args = [];
for (var i = 0; i < arguments.length; i++) {
args.push(arguments[i]);
}
// first argument is the error object
<!doctype html>
<!-- http://taylor.fausak.me/2015/01/27/ios-8-web-apps/ -->
<html>
<head>
<title>iOS 8 web app</title>
<!-- CONFIGURATION -->