Skip to content

Instantly share code, notes, and snippets.

View ronbeltran's full-sized avatar

Ronnie Beltran ronbeltran

View GitHub Profile

React.js Minimal Entropy Guide

DO's:

  • Use explicit contracts to pipe data & events between systems
  • Business rules should bubble towards the top, UI and semantics should sink towards the bottom

DONT's:

var monthly_plans = [
{
"id": "plus-monthly",
"name": "Plus",
"billing_cycle": "monthly",
"period_length": "months_1",
"monthly_price": 6.0,
"total_price": 6.0,
"selected": false,
"disabled": false,
@ronbeltran
ronbeltran / Makefile
Last active August 29, 2015 14:22 — forked from turicas/Makefile
test:
clear
nosetests --with-coverage --cover-package name_utils test_name_utils.py
clean:
find -regex '.*\.pyc' -exec rm {} \;
find -regex '.*~' -exec rm {} \;
.PHONY: test clean
@ronbeltran
ronbeltran / app.py
Last active August 29, 2015 14:22 — forked from berlotto/app.py
_slugify_strip_re = re.compile(r'[^\w\s-]')
_slugify_hyphenate_re = re.compile(r'[-\s]+')
def slugify(value):
"""
Normalizes string, converts to lowercase, removes non-alpha characters,
and converts spaces to hyphens.
From Django's "django/template/defaultfilters.py".
"""
import unicodedata
@ronbeltran
ronbeltran / sugar7_ubuntu_12.04_install.md
Created June 22, 2015 05:47
Install Sugar 7 CRM in Ubuntu 12.04
@ronbeltran
ronbeltran / gist:7fef58801bb1f173a92a
Last active August 29, 2015 14:27 — forked from jmertic/gist:5844627
Sample Java code using Jersey and JSONObject for connecting to the new RESTful SugarCRM REST API in 6.7 and later.
package com.sugarcrm.client;
import com.sun.jersey.api.client.Client;
import com.sun.jersey.api.client.ClientResponse;
import com.sun.jersey.api.client.WebResource;
import net.sf.json.JSONObject;
public class JerseyClientPost {
public static void main(String[] args) {
#!/usr/bin/env python
# http://support.sugarcrm.com/02_Documentation/04_Sugar_Developer/Sugar_Developer_Guide_6.7/02_Application_Framework/Authentication/Oauth/
# pip install oauth2
import urllib
import urlparse
import oauth2 as oauth
SUGAR_INSTANCE_URL = 'REPLACE-WITH-YOUR-SUGAR-URL'
@ronbeltran
ronbeltran / build-erlang-17.0.sh
Last active September 2, 2015 08:14 — forked from bryanhunter/build-erlang-17.0.sh
Build Erlang 17.0 on a fresh Ubuntu box (tested on 12.04 and 14.04)
#!/bin/bash
# Pull this file down, make it executable and run it with sudo
# wget https://gist.githubusercontent.com/bryanhunter/10380945/raw/build-erlang-17.0.sh
# chmod u+x build-erlang-17.0.sh
# sudo ./build-erlang-17.0.sh
if [ $(id -u) != "0" ]; then
echo "You must be the superuser to run this script" >&2
exit 1
fi
import random
ATTACKS = ('Cowboy', 'Ninja', 'Bear')
COWBOY = 0
NINJA = 1
BEAR = 2

Make it real

Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discuss around concrete examples, not hand-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