Skip to content

Instantly share code, notes, and snippets.

@ondrek
ondrek / pattern.js
Created April 16, 2015 11:16 — forked from adros/pattern.js
window.$config = function(){
var Config = function(){};
var selves = [];
Config.prototype = {
get $set(){ var self={}; selves.push(self); return self; },
get $get(){ return mixin(selves); }
};
!opener++ && console.log('getAvatarImg cache hit', url);
Source: http://forrst.com/posts/Shorthand_Javascript_Console_Log_Once-Jta
@ondrek
ondrek / luhn.js
Created October 14, 2013 18:04 — forked from ShirtlessKirk/luhn.js
// Variant of Avraham Plotnitzky's String.prototype method mixed with the "fast" version
// see: https://sites.google.com/site/abapexamples/javascript/luhn-validation
function luhnChk(luhn) {
var len = luhn.length,
mul = 0,
prodArr = [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9], [0, 2, 4, 6, 8, 1, 3, 5, 7, 9]],
sum = 0;
while (len--) {
@ondrek
ondrek / hack.sh
Created August 21, 2013 12:54 — forked from erikh/hack.sh
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#

DNS and DotCloud

In the following, replace example.net with your domain name. XXX.XXX.XXX.XXX is the IP of the reverse proxy.

DNS entries

Required DNS entries

example.net. 300 IN A XXX.XXX.XXX.XXX

@ondrek
ondrek / fiddle.css
Last active December 14, 2015 08:09 — forked from zalun/fiddle.css
body {
font-family: Helvetica, Verdana
}