Skip to content

Instantly share code, notes, and snippets.

View niedbalski's full-sized avatar
👋
Be humble. Stay focused.

Jorge Niedbalski niedbalski

👋
Be humble. Stay focused.
View GitHub Profile
@niedbalski
niedbalski / terms.json
Created November 26, 2012 21:35
terms.json
{
"www.fayerwayer.com": {
"www.fayerwayer.com/2012/05/coca-cola-lanza-su-aplicacion-smileworld-para-que-sigas-todos-los-detalles-de-la-eurocopa-2012-2/": [
{
"count": 7,
"term_type": {
"name": "Company",
"id": "Company"
},
"value": "Coca-Cola",
@niedbalski
niedbalski / foo.html
Created November 27, 2012 18:48
foo.html
Document Id: 5e2d07e2-2f94-4745-ad8c-b45094dfc674
Order Id: 60201754
Field Name Field Value
FieldTerminology tweets
Facility Mall Plaza
Company YouTube
Technology iPhone
Person Marilyn Yañez
Continent Europa
Person Obama
@niedbalski
niedbalski / typespeed.py
Created November 29, 2012 14:15
Typespeed bot
#!/usr/bin/env python2.7
# Jorge Niedbalski <niedbalski@pyrosome.org>
#
# [ Typespeed bot ]
#
# * apt-get install python-virtkey
# * pip install python-ptrace
# * Run typespeed
import zmq
import urlparse
import urllib
import json
DEFAULT_TIMEOUT=5
def parse(link):
url_data = urlparse.urlparse(link)
query = urlparse.parse_qs(url_data.query)
import zmq
import sys
context = zmq.Context()
socket = context.socket(zmq.PUSH)
socket.connect("tcp://172.21.0.49:5000")
socket.send_json({'video': sys.argv[1]})
sys.exit(0)
@niedbalski
niedbalski / lua-plugin.c
Last active December 10, 2015 23:59
Lua hook system to interact with lua scripts.
#include <lua.h>
#include <lauxlib.h>
#include <lualib.h>
#include <sys/stat.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include "nanoluadict.h"
@niedbalski
niedbalski / hand.obj
Created January 15, 2013 21:02
hand.obj
# This file uses centimeters as units for non-parametric coordinates.
mtllib Hand.mtl
g default
v 0.104451 0.238210 -0.347796
v 0.140692 0.210493 -0.345325
v 0.134587 0.212245 -0.319674
v 0.097379 0.237200 -0.323455
v -0.041789 0.206318 -0.341331
v -0.004346 0.233812 -0.343423
@niedbalski
niedbalski / act_as_executable.py
Last active May 29, 2021 09:43
act_as_executable decorator
#!/usr/bin/env python
__author__ = 'Jorge Niedbalski R. <jnr@pyrosome.org>'
from string import Template
import envoy
def act_as_executable(command):
@niedbalski
niedbalski / vpc_subnet_patch.patch
Last active December 17, 2015 03:28
vpc_id, vpc_subnet_id for image generation
diff -r ae783041933e nimbic_pkg/nimbic/amis/create_nimbic_amis.py
--- a/nimbic_pkg/nimbic/amis/create_nimbic_amis.py Thu Apr 04 14:10:08 2013 -0300
+++ b/nimbic_pkg/nimbic/amis/create_nimbic_amis.py Wed May 08 16:34:12 2013 -0300
@@ -181,6 +181,9 @@
else:
self.security_group_name = context.sec_group
+ self.sec_group_vpc_id = context.sec_group_vpc_id
+ self.sec_group_vpc_subnet_id = context.sec_group_vpc_subnet_id
+
@niedbalski
niedbalski / peewee_fake_fixture.py
Last active December 18, 2015 22:19
Fixture generator that randomly generates the model data.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
__author__ = 'Jorge Niedbalski R. <jnr@pyrosome.org>'
import peewee
import random
import datetime
import logging