Skip to content

Instantly share code, notes, and snippets.


Rafael Vega rvega

  • Medellín, Colombia
View GitHub Profile
View Ajaxy Workaround
response: function(){
var data =;
if(typeof(data) != 'undefined'){ // TODO: This is a temporary fix, see
var fb_params = {content: data}
$('#fancybox-content a.ajax').ajaxify();
View gist:1386180
* Get list of resources
fetch: function(store, query) {
store.loadQueryResults(query, SC.SparseArray.create({delegate: this, store: store, query: query, rangeWindowSize:20}));
return YES;
sparseArrayDidRequestLength: function(sparseArray) {
this.sparseArrayDidRequestRange(sparseArray, { start: 0, length: 20 });
rvega / gist:1608930
Created January 13, 2012 22:00
View gist:1608930
require "rake-pipeline-web-filters"
require "rake-pipeline-web-filters/helpers"
input "app"
output "compiled"
# Concatenate all js classes in one big file
match "js/{models,controllers}/**/*.js" do
concat "app.js"
rvega / gist:1612489
Created January 14, 2012 18:50
ember-runner preview
View gist:1612489
[rafaelvega@arch-rafa ember-runner]$ ember-runner preview
[task:checkConfig] Started
[task:configure] Started
[task:clean] Started
[vendors] Started
[apps] Started
[task:checkPackages] Started
[task:walk] Started
[build] Started
[Build] Package: jquery-1.6.2.js
View gist:1612522
[rafaelvega@arch-rafa ember-runner]$ ember-runner preview
[task:checkConfig] Started
[task:configure] Started
[task:clean] Started
[vendors] Started
[apps] Started
[task:checkPackages] Started
[task:walk] Started
[build] Started
[Build] Package: handlebars
View l2ork.log.txt
priority 6 scheduling enabled.
priority 8 scheduling enabled.
error in file /usr/lib/pd-l2ork/bin/ can't find package xapian 1.0.0
while executing
"package require xapian 1.0.0"
(file "/usr/lib/pd-l2ork/bin/search-plugin.tcl" line 22)
invoked from within
"source [file join [file dirname [info script]] search-plugin.tcl]"
(file "/usr/lib/pd-l2ork/bin/" line 8498)
tcl: /usr/lib/pd-l2ork/bin/ can't open script
rvega / gist:62578b981b003387b0fd
Created November 16, 2015 20:35
Compiling moocow/flite external in pd-l2ork fails.
View gist:62578b981b003387b0fd
(cd ../flite && sh ./configure CFLAGS="-DPD -I/home/Rafa/src/AUR-pd-l2ork/pd-l2ork/src/pd-l2ork/pd/src -Wall -W -ggdb -I/home/Rafa/src/AUR-pd-l2ork/pd-l2ork/src/pd-l2ork/Gem/src -I/home/Rafa/src/AUR-pd-l2ork/pd-l2ork/src/pd-l2ork/externals/pdp/include -DUNIX -Dunix -DDL_OPEN -fPIC -O2 -I/sw/include" LDFLAGS=" -L/home/Rafa/src/AUR-pd-l2ork/pd-l2ork/src/pd-l2ork/pd/src -L/home/Rafa/src/AUR-pd-l2ork/pd-l2ork/src/pd-l2ork/pd/bin -L/home/Rafa/src/AUR-pd-l2ork/pd-l2ork/src/pd-l2ork/pd/obj -L/sw/lib" --with-pd-include="/home/Rafa/src/AUR-pd-l2ork/pd-l2ork/src/pd-l2ork/pd/src" --with-pd-dir="/home/Rafa/src/AUR-pd-l2ork/pd-l2ork/src/pd-l2ork/externals/moocow/extended/build.moo" --disable-dependency-tracking && make clean) || echo "(MOOCOW) Warning: sub-target failed: 'flite.configure_stamp'"
configure: pre-processing user CFLAGS...
configure: got CFLAGS="-DPD -I/home/Rafa/src/AUR-pd-l2ork/pd-l2ork/src/pd-l2ork/pd/src -Wall -W -ggdb -I/home/Rafa/src/AUR-pd-l2ork/pd-l2ork/src/pd-l2ork/Gem/src -I/home/Rafa/src/AUR-pd-
View am335x-boneblack-audio-fixed.dts
* Copyright (C) 2012 Texas Instruments Incorporated -
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
#include "am33xx.dtsi"
rvega / main.cpp
Created April 9, 2018 02:07
Rendering video content with libvlc to an openGL texture.
View main.cpp
#include <mutex>
#include <vlc/vlc.h>
#include <stb_image.h>
#include <nanogui/nanogui.h>
class VideoView: public nanogui::GLCanvas {
nanogui::GLShader shader;
GLuint textureId;
rvega / main.cpp
Created April 9, 2018 18:37
generating pixel texture with secondary thread
View main.cpp
#include <nanogui/screen.h>
#include <nanogui/window.h>
#include <nanogui/glcanvas.h>
#include <nanogui/layout.h>
#include <nanogui/opengl.h> // includes most opengl definitions
#include <iostream>
#include <mutex>
#include <cstdint>
#include <thread>