Skip to content

Instantly share code, notes, and snippets.

View csanz's full-sized avatar
🎯
Focusing

Christian Sanz csanz

🎯
Focusing
View GitHub Profile
@csanz
csanz / whyichosemac.md
Created July 31, 2011 18:32
Why I chose Mac OS X over Windows

So my brother sent me an email asking me why I chose Mac OS X over the Windows OS (PC)

email from my brother

With my federal loan I can buy a new laptop… I was wondering your opinion as coder and programmer. Why you changed to mac? Is it better? Would you say the same… or is it worthwhile for my Masters where I am going to have emphasis on computer science courses

my Response

it really doesn't matter, today you can pretty much do anything on a windows machine that you typically do on a mac via virtual machines. me choosing a mac was more of a personal preference. I forced myself to try it out (geek thing) and ended up loving it... but I have to admit, going from windows to mac wasn't easy at first because I had to learn a lot (the first week). <<< I transitioned 5 years ago

csanz$ npm install
> [email protected] install /Users/csanz/Projects/geeklist/www_staging/node_modules/mongoose/node_modules/mongodb
> bash ./install.sh
================================================================================
= =
= To install with C++ bson parser do <npm install mongodb --mongodb:native> =
= the parser only works for node 0.4.X or lower =
= =
Total 526 (delta 373), reused 526 (delta 373)
-----> Heroku receiving push
-----> Node.js app detected
-----> Vendoring node 0.4.7
-----> Installing dependencies with npm 1.0.8
> [email protected] install /tmp/build_1agwg1lk02y19/node_modules/mongoose/node_modules/mongodb
> bash ./install.sh
@csanz
csanz / must_have_sublime_settings.json
Created July 16, 2011 05:47
Must Have Sublime Text 2 Setting
// Change inside File Global Settings
{
tab_size: 2
, translate_tabs_to_spaces: true
}
/* http://www.sublimetext.com/docs/2/indentation.html */
@csanz
csanz / server.js
Created July 13, 2011 22:40
Pushing Sessions to Redis w/ Nodejs and Express
/* See instructions below */
var express = require('express')
, RedisStore = require('connect-redis')(express);
var app = express.createServer();
app.configure(function(){
this
.use(express.cookieParser())
Ok, you made it here, now you need to:
01100101 01101101 01100001 01101001 01101100 00100000 01110101 01110011 00100000 01100001 01110100 00100000 01100011 01110101 01110010 01101001 01101111 01110101 01110011 01000000 01100111 01100101 01100101 01101011 01101100 01101001 00101110 01110011 01110100 00100000 01110111 00101111 00100000 01110011 01110101 01100010 01101010 01100101 01100011 01110100 00100000 01101100 01101001 01101110 01100101 00100000 00100010 01001001 00100000 01010111 01000001 01001110 01010100 00100000 01001101 01011001 00100000 01000011 01001111 01000100 01000101 00100000 01000010 01001001 01010100 01000011 01001000 01000101 01010011 00100001 00100010
@csanz
csanz / README.md
Created July 12, 2011 07:51 — forked from tmpvar/.gitignore
A console.log implementation that plays "nice" with large amounts of data. It Keeps node alive until the output has flushed to the screen.

Install

npm install console.log

Usage

require('console.log') and go about your day

How it works

@csanz
csanz / jade_stylus_sublime.md
Created July 11, 2011 19:22
Getting Jade and Stylus working w/ Sublime Text 2

Download Jade and Stylus bundles

https://github.com/miksago/jade-tmbundle
https://github.com/LearnBoost/stylus/tree/master/editors

~/Downloads/

Create directories:

cd ~/Library/Application\ Support/Sublime\ Text\ 2/Packages

@return boolean
User.statics.isFollowing(session, user_id)
// Will check if you are already following this user
// find(/username, function(user
// if(user.followersContains(session.user.id)
// return true
@csanz
csanz / short_code_generator.js
Created June 15, 2011 10:36
Just a simple, mini short code generator.
// For Nodejs
const crypto = require('crypto');
/**
* Get Short Code
*
* Mini Short Code Generator
*
* @param {Number} size