Skip to content

Instantly share code, notes, and snippets.

View pedroparra's full-sized avatar
🏠
Working from home

Pedro J. Parra pedroparra

🏠
Working from home
View GitHub Profile
@pedroparra
pedroparra / readme.md
Created May 5, 2015 08:42
Fix nvm PATH node

OSX

All I needed to do was adding this line to .bash_profile // .zshrc export PATH="$PATH":~/.node/bin

Ubuntu/Debian

Add this line to .bashrc // .zshrc export PATH="$HOME/npm/bin:$PATH"

@pedroparra
pedroparra / Readme.md
Created April 27, 2015 17:43
Install Rvm, ruby and Rhc (Openshift)

Install Rvm, ruby and Rhc (Openshift)

RVM

Ruby

  • rvm list known
  • rvm install 2.2.1
  • rvm use 2.2.1
@pedroparra
pedroparra / app.js
Last active August 29, 2015 14:16
Express js. Using a different less folder.
/*
Less source folder: /less
Destination folder: /public/css
*/
var lessMiddleware = require('less-middleware');
app.use(lessMiddleware(path.join(__dirname, 'less'), {
dest: path.join(__dirname, 'public'),
compress: false,
preprocess: {
@pedroparra
pedroparra / products.jade
Created February 16, 2015 12:16
Shuffle in Jade
- function shuffle(o){ for(var j, x, i = o.length; i; j = Math.floor(Math.random() * i), x = o[--i], o[i] = o[j], o[j] = x); return o; };
- var shuffleProductos = shuffle( products );