Skip to content

Instantly share code, notes, and snippets.

View holmesal's full-sized avatar
:bowtie:
reactin'

Alonso Holmes holmesal

:bowtie:
reactin'
View GitHub Profile
import base64
from django.utils import simplejson
import urllib
from google.appengine.api import urlfetch
def track(event, properties=None):
"""
A simple function for asynchronously logging to the mixpanel.com API on App Engine
(Python) using RPC URL Fetch object.
@param event: The overall event/category you would like to log this data under
var tessel = require('tessel');
var net = tessel.net;
console.log("connecting");
var client;
var port;
var clients = [];
setInterval(function () {
@holmesal
holmesal / gist:6719426
Last active December 24, 2015 00:49
namespaces and events for robin backstage
/events/:id/walls `create`
/walls/:id `update`, `delete`
/walls/:id/layouts `create`
/layouts/:id `update`, `delete`
/layouts/:id/sections `create`
/sections/:id `update`, `delete`
/sections/:id/contents `create`
@holmesal
holmesal / postman
Last active January 4, 2016 00:59
postman tests for robin sockets
Sections
---
https://www.getpostman.com/collections/bfa5cede080b07544244
Walls
---
https://www.getpostman.com/collections/2578131c3e985fc38901
Layouts
---
@holmesal
holmesal / gist:9392023
Created March 6, 2014 15:23
socket example
<!DOCTYPE html>
<head>
<script src="http://node.staging.robinpowered.com/socket.io/socket.io.js"></script>
<script type="text/javascript">
socket = io.connect('http://robin-grid.omrdev.com:80/clients');
// socket = io.connect('http://localhost:9200/clients');
736f 6c69 6420 7265 7633 2020 2020 2020
2020 2020 2020 2020 2020 2020 2020 2020
2020 2020 2020 2020 2020 2020 2020 2020
2020 2020 2020 2020 2020 2020 2020 2020
2020 2020 2020 2020 2020 2020 2020 2020
8402 0000 0000 0000 0000 803f 0000 0000
c290 be40 9f4d 0442 cdcc b141 62a8 9d40
9f4d 0442 15e1 c041 3317 e640 9f4d 0442
15e1 c041 0000 0000 0000 0000 803f 0000
0000 c290 be40 9f4d 0442 cdcc b141 3317
module.exports = function (grunt) {
// show elapsed time at the end
require('time-grunt')(grunt);
// load all grunt tasks
require('load-grunt-tasks')(grunt);
//MODIFIED: add require for connect-modewrite
var modRewrite = require('connect-modrewrite');
grunt.initConfig({
@holmesal
holmesal / gist:5e33c8ce6cf76a7d2058
Created August 10, 2014 07:07
Building mac app from node-webkit
Can use sips to convert any png to icns, as long as it's as long as it's either 128x128, 256x256 or 512x512 pixel.
See here: http://portingteam.com/topic/4750-icns-conversion-with-sips/
sips -s format icns "icon.png" --out "icon.icns"
Can use yoursway-create-dmg to bundle like so:
./create-dmg --volname "Shortwave" --window-size 490 510 --background doge.jpg --icon Shortwave.app 100 245 --app-drop-link 390 245 --volicon icon.icns Shortwave.dmg /Users/alonsoholmes/developer/shortwave-web/releases/shortwave/osx
@holmesal
holmesal / gist:eb21762b2df00338dcde
Created September 17, 2014 21:42
build.js for famous 0.3.0-alpha
window.famous = {
core: {
Context: require('./core/Context'),
ElementAllocator: require('./core/ElementAllocator'),
ElementOutput: require('./core/ElementOutput'),
Engine: require('./core/Engine'),
Entity: require('./core/Entity'),
EventEmitter: require('./core/EventEmitter'),
EventHandler: require('./core/EventHandler'),
Group: require('./core/Group'),
//
// ESTransponder.m
// transponder
//
// Created by Alonso Holmes on 4/1/14.
// Copyright (c) 2014 Buildco. All rights reserved.
//
#import "ESTransponder.h"
#import <Firebase/Firebase.h>