Skip to content

Instantly share code, notes, and snippets.

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

Ernesto Vargas netoxico

🏠
Working from home
View GitHub Profile

Make it real

Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discussions around concrete examples, not handy-waving abstractions. Don't say you did something, provide a URL that proves it.

Ship it

Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.

Do it with style

###ANGULAR.JS

<html ng-app>

###Data Binding

<input type="text" ng-model="yourModel">
@netoxico
netoxico / calculator.py
Created October 31, 2013 21:44
A Calculator Implemented With A Top-Down, Recursive-Descent Parser
#!/usr/bin/env pytho
'''A Calculator Implemented With A Top-Down, Recursive-Descent Parser'''
# Author: Erez Shinan, Dec 2012
import re, collections
from operator import add,sub,mul,div
Token = collections.namedtuple('Token', ['name', 'value'])
RuleMatch = collections.namedtuple('RuleMatch', ['name', 'matched'])
@netoxico
netoxico / ssh-copy-id.sh
Last active October 30, 2024 04:55
Shell script to install your public key on a remote machine
#!/bin/sh
# Shell script to install your public key on a remote machine
# Takes the remote machine name as an argument.
# Obviously, the remote machine must accept password authentication,
# or one of the other keys in your ssh-agent, for this to work.
ID_FILE="${HOME}/.ssh/id_rsa.pub"
if [ "-i" = "$1" ]; then
@netoxico
netoxico / Apple push notification
Created December 16, 2013 23:48
Apple push notification with python
#!/usr/bin/env python
import ssl
import json
import socket
import struct
import binascii
def send_push_message(token, payload):
# the certificate file generated from Provisioning Portal
@netoxico
netoxico / gist:8191313
Last active January 1, 2016 19:38
Objective C Notes

Log object class

NSLog(@"object: %@", [self.dynamicsDrawerViewController class]);

Log all font familyNames

for (NSString* family in [UIFont familyNames])
(function(global) {
var get = Ember.get, set = Ember.set, doc = document;
global.FastSelectComponent = Ember.Component.extend({
items: null,
valuePath: 'value',
labelPath: 'label',
value: null,
selected: null,
/* global google */
var GoogleMapComponent = Ember.Component.extend({
places: [],
width: 500,
height: 500,
attributeBindings: ['style'],
style: function () {
return 'width:'+this.width+'px; height:'+this.height+'px';
@netoxico
netoxico / gist:11277816
Created April 25, 2014 04:37
Install fabric Mac

Install fabric on mac os X and Xcode 5.1

sudo ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future pip install fabric
import httplib
import ssl
import socket
import sys
import urllib2
class HTTPSConnectionV3(httplib.HTTPSConnection):
def __init__(self, *args, **kwargs):
httplib.HTTPSConnection.__init__(self, *args, **kwargs)