Skip to content

Instantly share code, notes, and snippets.

View gmorell's full-sized avatar
⛱️

Gabe gmorell

⛱️
View GitHub Profile
@gmorell
gmorell / gist:6175836
Last active December 20, 2015 18:28
epos hates life
[INFO] [WallTime: 1375892955.428802] Control message received. Watchdog reset.
[robolink-1] process has died [pid 12964, exit code -11, cmd /home/robolink/groovy_workspace/sandbox/EposManager/bin/EposManager joint_0 joint_1 joint_2 joint_3 joint_4 __name:=robolink __log:=/home/robolink/.ros/log/87ede3b0-ff76-11e2-a6c1-002710e16450/robolink-1.log].
log file: /home/robolink/.ros/log/87ede3b0-ff76-11e2-a6c1-002710e16450/robolink-1*.log
Exception in thread Thread-7:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 551, in __bootstrap_inner
self.run()
File "/opt/ros/groovy/lib/python2.7/dist-packages/rospy/timer.py", line 194, in run
self._callback(TimerEvent(last_expected, last_real, current_expected, current_real, last_duration))
File "/home/robolink/groovy_workspace/sandbox/robolink/src/robolink/scripts/RobolinkDriver.py", line 678, in publishRobolinkInfoCallback
@gmorell
gmorell / plugin.py
Last active December 26, 2015 02:19
Fucking Around With Websockets
###
# Copyright (c) 2013, Gabriel Morell-Pacheco
# All rights reserved.
#
#
###
import supybot.conf as conf
import supybot.utils as utils
import supybot.world as world
@gmorell
gmorell / initial.yml
Created November 17, 2013 01:51
BootStrap Ansible Onto Debian
---
- hosts: all
user: admin
sudo: yes
gather_facts: False
tasks:
- name: Install ansible deps
raw: apt-get update
- name: Install ansible deps
@gmorell
gmorell / gist:8661351
Last active January 4, 2016 18:29 — forked from anonymous/gist:8656123
Crazy processing hexagons, make a bootsplash .zip later.
int[][] result;
float time;
void draw() {
for (int i=0; i<width*height; i++)
for (int a=0; a<3; a++)
result[i][a] = 0;
for (int sa=0; sa<samplesPerFrame; sa++) {
time = map(frameCount-1 + sa*shutterAngle/samplesPerFrame, 0, numFrames, 0, 1);
@gmorell
gmorell / gist:8985867
Created February 13, 2014 23:07
example
{
"id": "1975612862",
"type": "PushEvent",
"actor": {
"id": 1149915,
"login": "gmorell",
"gravatar_id": "f823a8df81ddb2427662ba481fee8725",
"url": "https://api.github.com/users/gmorell",
"avatar_url": "https://gravatar.com/avatar/f823a8df81ddb2427662ba481fee8725?d=https%3A%2F%2Fa248.e.akamai.net%2Fassets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png&r=x"
},
import struct, time, btle
# get the bulb
n = btle.Peripheral("C4:ED:BA:56:8D:05")
# get the services on the bulb
n.discoverServices()
cc = n.services.values()[3]
x = cc.getCharacteristics()
import boto.vpc
import time
REGION_NAME = 'us-west-2'
AMI_ID = 'ami-8e27adbe' # Amazon Linux AMI
conn = boto.vpc.connect_to_region(REGION_NAME)
# Create a VPC
vpc = conn.create_vpc('10.0.0.0/16')
>>> def elk(height, weight):
... print weight
... print height
...
>>> input = {"height":1, "weight":2}
>>> elk(**input)
2
1
>>>
<head>
<!-- Foundation CSS CDN -->
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/foundation/5.4.1/css/foundation.min.css">
<!-- Modernizr CDN -->
<script src="//cdnjs.cloudflare.com/ajax/libs/foundation/5.4.1/js/vendor/modernizr.js"></script>
</head>
<body>
<!-- APP CONTENT -->
<!-- jQuery CDN -->
@gmorell
gmorell / dict2xml.py
Last active August 29, 2015 14:14 — forked from reimund/dict2xml.py
"""
Simple xml serializer.
@author Reimund Trost 2013
Example:
mydict = {
'name': 'The Andersson\'s',
'size': 4,