Skip to content

Instantly share code, notes, and snippets.

View bigmeech's full-sized avatar
🏀
Focusing

LE bigmeech

🏀
Focusing
  • United Kingdom
View GitHub Profile
@bigmeech
bigmeech / stuns
Created December 12, 2013 01:45 — forked from zziuni/stuns
# source : http://code.google.com/p/natvpn/source/browse/trunk/stun_server_list
# A list of available STUN server.
stun.l.google.com:19302
stun1.l.google.com:19302
stun2.l.google.com:19302
stun3.l.google.com:19302
stun4.l.google.com:19302
stun01.sipphone.com
stun.ekiga.net
@bigmeech
bigmeech / stuns
Created December 12, 2013 09:59 — forked from zziuni/stuns
# source : http://code.google.com/p/natvpn/source/browse/trunk/stun_server_list
# A list of available STUN server.
stun.l.google.com:19302
stun1.l.google.com:19302
stun2.l.google.com:19302
stun3.l.google.com:19302
stun4.l.google.com:19302
stun01.sipphone.com
stun.ekiga.net
@bigmeech
bigmeech / gist:0309e3c39baa927a11f1
Last active August 29, 2015 14:07
Switch is Evil, Really?
var action1 = function(){
return "Action 1 executed"
};
var action2 = function(){
return "Action 2 executed"
};
var def = function(){
return "Default Action Executed"
};
@bigmeech
bigmeech / gist:abb53b238eaaf3fa1971
Last active August 29, 2015 14:07
switch alternative
function fomatCSV(req, res){
//format csv
}
function formatExcel(req, res){
//formatExcel
}
//------- switch alternative--
var formats = {
@bigmeech
bigmeech / JSIterator
Created November 15, 2014 17:35
Simple Iterator Interface in JS
function InteratorIterface(){
function Iterator(arr){
this.data = arr
this.pointer = 0;
}
Iterator.prototype.first = function(){
return this.data[0]
}
var fs = require('fs');
var express = require('express');
var glob = require('glob');
var deAsync = require('deasync');
var path = require('canonical-path');
var _ = require('lodash');
/**
*
* @constructor RouteController
_='';('H')+(((_>_)+_)[((_==_)+(_==_))*2])+(_+(_<_)+_)[((!_!=_)+(_==_))]+(_+(_!=_))[((!_!=_)+(!_!=_))]+(_+{})[+!_]+(' W')+(_+{})[+!_]+((_==_)+_)[(_==_)+(_!=_)]+((_!=_)+_)[(_==_)+(!_>_)]+((_._+_)[(_._!=_)+(_==_)])
@bigmeech
bigmeech / greper.js
Last active September 2, 2015 08:18
node greping
var exec = require('child_process').exec;
var httpClient = require('request');
var _ = require('underscore');
var fs = require('fs');
var download = function (uri, filename, onDownloadComplete) {
httpClient.head(uri, function (err, res, body) {
httpClient(uri)
.pipe(fs.createWriteStream("./razunaImages/" + filename))
.on('close', onDownloadComplete);
function DoorsWorld(passes){
this.doors = []
this.passes = passes
for(var i = 0; i < 100;i++){
this.doors.push({
number:++i,
state:'closed'
})
}