Skip to content

Instantly share code, notes, and snippets.

View UnidentifiedContributor's full-sized avatar
🔥
Can't stop, won't stop

Anonymous Developer UnidentifiedContributor

🔥
Can't stop, won't stop
  • Portland, OR
  • 01:53 (UTC -07:00)
View GitHub Profile
for(var i=1;i<=100;i++){console.log([3,5].map(function(x){if(!(i%x)){return x==3?"Fizz":"Buzz"}}).join('')||i.toString())}
var getValue = function(dat,v){
var
reg = new RegExp(['<',v,'>(.*)<\/',v,'>'].join('')) // <tag>grabber</tag>
, res = dat.match(reg)
;
return res.length>1 ? res[1]||null : undefined
};
[17.44.42] < pyrotechnick> Meteor more like Meatybore
[17.45.05] < pyrotechnick> Fall colors in spring, you have to be kidding me.
[17.45.13] <@Nexxy> rofl
[17.45.32] < pyrotechnick> npm init meatyboar
[17.47.57] < pyrotechnick> i wish npm had smart packages
[17.48.19] < yaymukund> pyrotechnick: what do you mean by smart packages?
[17.48.20] < AAA_awright> As if we need any more npm...
[17.48.30] < pyrotechnick> its so stupid and standards-compliant
[17.48.56] < deoxxa> lol AAA_awright, how's your pure git system going?
[17.48.57] < jhbot> 'Server-side includes in expressjs' by Cliff F
~=[ PORTLAND BINGO ]=~
(once is enough)
| |
Hipster on bicycle | You smell weed!! | Hipster on bicycle
| |
| |
| |
| |
| |
@UnidentifiedContributor
UnidentifiedContributor / gist:2723185
Created May 18, 2012 04:41
redis-connect session snippet
var
redisConf = {
host : "localhost"
, port : "6379"
}
, express = require('express')
, app = express.createServer()
, ConnectRedis = require('connect-redis')(express)
, redisStore = new ConnectRedis(redisConf)
@UnidentifiedContributor
UnidentifiedContributor / gist:2819117
Created May 28, 2012 13:18
mmalecki hates hyphens
{
"name": "dark-portal",
"description": "Venue Portal of the Dark Arts",
"version": "0.0.1",
"author": "Emily Rose <emily@contactvibe.com>",
"dependencies": {
"riak-js": "0.4.x",
"async": "0.1.x",
"express": "2.5.x",
"connect": "1.7.x",
[19.53.50] < myndzi> undeclared reference, foo is not defined! on irc i asked for help but help was hard to find!
[19.54.37] < myndzi> with nexxy to the rescue though my code is super stable. i'm pumping bits all up and down my hundred meg
cable :P
@UnidentifiedContributor
UnidentifiedContributor / gist:2921105
Created June 13, 2012 00:55
animated scroll...
var easyScroll = function(selector, cb) {
var offset = $(selector).offset().top;
$('html, body').stop(true).animate({ scrollTop : ( (offset - 75 ) < 0 ? 0 : (offset - 75) ) }, {
duration : 300
}, function(){
if((cb) && (typeof cb == "function")) {
cb();
@UnidentifiedContributor
UnidentifiedContributor / gist:3185821
Created July 27, 2012 02:13
alex4nder trolls hard
--- Log opened Thu Jul 26 22:07:40 2012
22:07 »¡« Irssi: Starting query in freenode with alex4nder
22:07 <Nexxy> please be appropriate and respectful while participating in #node.js :)
22:07 <alex4nder> eat shit
22:08 <Nexxy> as you wish
22:08 <alex4nder> you're on IRC, and what I said barely qualifies as NSFW.
22:08 <Nexxy> I'm not going to argue with you :)
--- Log closed Thu Jul 26 22:08:29 2012
--- Log opened Thu Jul 26 22:08:39 2012
22:08 [alex4nder(~alexander@ns2.lexterieur.net)] alright.
@UnidentifiedContributor
UnidentifiedContributor / gist:3322493
Created August 11, 2012 08:27
orobos-orias opened/closed circuit trigger sketch
int trigger = 0;
int inPin = 8;
int outPin = 9;
unsigned long lastReport;
unsigned long currentStamp;
String output;
void setup() {
Serial.begin(115200);