Skip to content

Instantly share code, notes, and snippets.

View alduro's full-sized avatar

Aldo Nievas alduro

  • Buenos Aires - Argentina
  • 01:44 (UTC -03:00)
View GitHub Profile
def render("product.json", %{product: product}) do
%{id: product.id,
name: product.name,
description: product.description,
price: product.price}
|> add_options(product)
end
defp add_options(json, %{product: product}) do
options =
set nocompatible " be iMproved, required
filetype off " required
let mapleader = ','
set wildmenu
set autoread
set encoding=utf-8
"set guifont=Liberation_Mono_for_Powerline:h16
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
'use strict';
import React, { AppRegistry } from 'react-native';
import App from './app/containers/App';
AppRegistry.registerComponent('Main', () => App);
-- App.js
@alduro
alduro / gist:8586831
Created January 23, 2014 21:08
netstat
aldo@macbook ~/Satio/Desarrollo/node/control (user-management) > netstat | grep ESTABLISHED
tcp4 0 0 192.168.0.14.62746 82-241-30-181.fi.https ESTABLISHED
tcp4 0 0 192.168.0.14.62745 ec2-50-19-80-20..https ESTABLISHED
tcp4 0 0 192.168.0.14.62719 qc-in-f125.1e100.jabbe ESTABLISHED
tcp4 0 0 192.168.0.14.62712 17.172.232.133.5223 ESTABLISHED
tcp4 0 0 192.168.0.14.62697 157.56.116.204.12350 ESTABLISHED
tcp4 0 0 192.168.0.14.62451 qe-in-f189.1e100.https ESTABLISHED
tcp4 0 0 192.168.0.14.61201 vb-in-f125.1e100.jabbe ESTABLISHED
tcp4 0 0 192.168.0.14.61170 173.192.82.195-s.http ESTABLISHED
tcp4 0 0 192.168.0.14.61171 173.192.82.195-s.http ESTABLISHED
// Karma configuration
// Generated on Wed Jan 15 2014 15:09:26 GMT-0300 (ART)
module.exports = function(config) {
config.set({
// base path, that will be used to resolve files and exclude
basePath: '.',
AddressController.setDefault = function () {
var this_ = this;
var addressId = this_.params('id');
if (!this.req.isAuthenticated()) { return this.res.json(generateResponse(false, 'Cant Get Addresses, Not Logged In' , null)) };
var conditions = { userId: this.req.user.id,
id: addressId }
var Sequelize = require("sequelize");
module.exports = {
// These are shortcuts to type and validatation definations commonly used in our models
unique_email: {
type: Sequelize.STRING,
allowNull: false,
validate: {
notEmpty: true,
@alduro
alduro / gist:7129031
Created October 24, 2013 00:08
Stats for Knicks
Object {fn: "Carmelo", ln: "Anthony", num: "7", pos: "F", min: "26"…}
age: 0
ast: "1"
blk: "3"
blka: "1"
country: null
court: "0"
dob: "1984-05-29"
dreb: "5"
dy: "2003"
@alduro
alduro / gist:7129043
Created October 24, 2013 00:10
Stats for Rangers
Object {playerId: "8476468", playerName: "J.T. Miller", playerType: "S", goals: "0", assists: "0"…}
age: 20
assists: "0"
blockedShots: "0"
country: "USA"
dob: null
dy: null
fname: "J.T."
goals: "0"
gwgoals: "0"
@alduro
alduro / gist:6684863
Last active December 23, 2015 19:49
Changes for google analytics
in client/app/app.coffee add line 19
angular.module('app', [
'app.db',
'app.filters',
'app.directives',
'app.constants',
'app.modules.admin.menu',
'app.modules.admin.dashboard',
'app.modules.admin.users',