Skip to content

Instantly share code, notes, and snippets.

View automata's full-sized avatar

Vilson Vieira automata

View GitHub Profile
Using worker: worker-linux-docker-80060c04.prod.travis-ci.org:travis-linux-1
Build system information
Build language: node_js
Build group: stable
Build dist: precise
Build image provisioning date and time
Thu Feb 5 15:09:33 UTC 2015
Operating System Details
Distributor ID: Ubuntu
noflo = require 'noflo'
unless noflo.isBrowser()
chai = require 'chai' unless chai
{%= component_name %} = require '../components/{%= component_name %}.coffee'
baseDir = path.resolve __dirname, '../'
testutils = require './testutils'
else
{%= component_name %} = require '{%= name %}/components/{%= component_name %}.js'
describe '{%= component_name %} component', ->
@automata
automata / test-rotate-on-center.c
Created September 29, 2015 02:13
Test rotate-on-center.c op for GEGL
#include <gegl.h>
#include <gegl/gegl-matrix.h>
#include <math.h>
static void
generate_matrix (GeglMatrix3 *matrix,
gdouble degrees,
gdouble x,
gdouble y,
gdouble width,
vilson@macbook:~/repos/imgflo/dependencies/gegl$ diff ~/src/automata/gegl/operations/transform/transform-core.c operations/transform/transform-core.c
31c31
<
---
> #include <stdio.h>
334,335c334,335
< output->x = (gint) floor ((double) min_x);
< output->y = (gint) floor ((double) min_y);
---
> output->x = (gint) ceil ((double) min_x);
@automata
automata / load-rotate-crop-save.c
Created September 25, 2015 20:38
GEGL code to load, rotate, crop and save an image. Use: ./foo in.png out.png. WIP!
#include <gegl.h>
#include <glib/gprintf.h>
gint
main (gint argc,
gchar **argv)
{
GeglNode *gegl,
*save,
#include <MIDI.h>
/*
This example is a modified version of Basic I/O MIDI tutorial
by Franky. It tries to demonstrate how to use Arduino MIDI
library together with ttyMIDI. You will need to install
Arduino MIDI library for this to work:
http://www.arduino.cc/playground/Main/MIDILibrary
All example patches shipped with the Arduino MIDI library
@automata
automata / Makefile.patch
Created August 13, 2015 11:45
Patch to ttymidi
--- Makefile 2015-08-13 08:41:02.110102909 -0300
+++ ../Makefile 2015-08-13 08:24:39.326062165 -0300
@@ -1,5 +1,5 @@
all:
- gcc src/ttymidi.c -o ttymidi -lasound
+ gcc src/ttymidi.c -o ttymidi -lasound -lpthread
clean:
rm ttymidi
install:
# Lib to numeric analysis and computer vision (opencv)
import numpy as np
import cv2
# Lib to download stuff from Web
import urllib
# Download the URL and save it to the specified file (change the URL for your need)
urllib.urlretrieve("http://www.gunnerkrigg.com/comics/00000001.jpg", "file.jpg")
# Load an color image in color
img = cv2.imread('file.jpg')
# Load the Cascade file, grab it from https://raw.githubusercontent.com/shantnu/FaceDetect/master/haarcascade_frontalface_default.xml
@automata
automata / gist:f642452e08e1e74a1d33
Created March 29, 2015 21:53
test-vips-buildpack | only vips and nodejs, result of npm install noflo-sharp
MacBook-Pro-de-Vilson:test-vips-buildpack vilson$ heroku run bash -a test-heroku-buildpack
Running `bash` attached to terminal... lfailed
! You do not have access to the app test-heroku-buildpack.
MacBook-Pro-de-Vilson:test-vips-buildpack vilson$ heroku run bash -a test-vips-buildpackRunning `bash` attached to terminal... up, run.5124
Detected 512 MB available memory, 512 MB limit per process (WEB_MEMORY)
Recommending WEB_CONCURRENCY=1
~ $ ls
README bin node_modules package.json vendor
~ $ ls
README bin node_modules package.json vendor
@automata
automata / noflo.json
Created March 18, 2015 23:30
To linkedin bg
{
"properties": {
"name": "Hello Canvas!",
"id": "0489cd4be882a7b09795",
"environment": {
"type": "noflo-browser",
"content": "<style>\nbody {\n background-color: rgb(233, 233, 233);\n}\n</style>\n\n<canvas id=\"mycanvas\" width=\"1400\" height=\"425\"></canvas>"
},
"icon": ""
},