Skip to content

Instantly share code, notes, and snippets.

@Wu-Wu
Wu-Wu / haproxy.conf
Created June 29, 2013 14:44
HAProxy configuration to deploy PSGI application
#
# application entry points
# https://www.example.com/ (production)
# https://demo.example.com/ (demo/lite production)
# https://devel.example.com/ (development)
#
# static content served by nginx server
# http://app-be1.example.net:4xxx/
# http://app-be2.example.net:4xxx/
#
@rjmackay
rjmackay / main.js
Created June 12, 2013 01:10
Mapbox + requirejs example
requirejs.config({
shim: {
'http://api.tiles.mapbox.com/mapbox.js/v1.0.2/mapbox.js': {
exports: 'L'
}
}
});
require(["http://api.tiles.mapbox.com/mapbox.js/v1.0.2/mapbox.js"], function(mapbox) {
@faisalman
faisalman / baseConverter.js
Last active January 11, 2023 14:43
Convert From/To Binary/Decimal/Hexadecimal in JavaScript
/**
* Convert From/To Binary/Decimal/Hexadecimal in JavaScript
* https://gist.github.com/faisalman
*
* Copyright 2012-2015, Faisalman <[email protected]>
* Licensed under The MIT License
* http://www.opensource.org/licenses/mit-license
*/
(function(){
@tony4d
tony4d / p4merge4git.md
Created August 24, 2012 19:00
Setup p4merge as a visual diff and merge tool for git
@bellbind
bellbind / bigint.js
Created November 24, 2011 10:06
[javascript]clear big integer implementation
// clear Big Integer implementation of JavaScript/ECMAScript5
// BigDecimal(10**n base): for string conversion
// - BigInt and BigDecimal are basically same.
var BigDecimal = this.BigDecimal = function (ints, sign) {
var ctor = BigDecimal;
ints = ints || [];
sign = ctor.normalize(ints, sign || 1);
return Object.freeze(Object.create(ctor.prototype, {
ints: {value: Object.freeze(ints), enumerable: true},