Skip to content

Instantly share code, notes, and snippets.

View rvega's full-sized avatar

Rafael Vega rvega

  • Medellín, Colombia
View GitHub Profile
response: function(){
var data = this.State.Response.data.responseText;
if(typeof(data) != 'undefined'){ // TODO: This is a temporary fix, see http://getsatisfaction.com/balupton/topics/back_button_triggers_an_ajax_request_thet_should_not_happen
var fb_params = {content: data}
$.extend(true,fb_params,ajax_deeplinks.fancybox_options);
$.fancybox(fb_params);
$('#fancybox-content a.ajax').ajaxify();
}
else{
$.fancybox.close();
/**
* 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
rvega / gist:1608930
Created January 13, 2012 22:00
Assetfile
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"
end
@rvega
rvega / gist:1612489
Created January 14, 2012 18:50
ember-runner preview
[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
[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
priority 6 scheduling enabled.
priority 8 scheduling enabled.
error in file /usr/lib/pd-l2ork/bin/pd.tk: 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/pd.tk" line 8498)
tcl: /usr/lib/pd-l2ork/bin/pd.tk: can't open script
@rvega
rvega / gist:62578b981b003387b0fd
Created November 16, 2015 20:35
Compiling moocow/flite external in pd-l2ork fails.
(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-
/*
* Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
*
* 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.
*/
/dts-v1/;
#include "am33xx.dtsi"
@rvega
rvega / main.cpp
Created April 9, 2018 02:07
Rendering video content with libvlc to an openGL texture.
#include <mutex>
#include <vlc/vlc.h>
#include <stb_image.h>
#include <nanogui/nanogui.h>
class VideoView: public nanogui::GLCanvas {
public:
nanogui::GLShader shader;
GLuint textureId;
@rvega
rvega / main.cpp
Created April 9, 2018 18:37
generating pixel texture with secondary thread
#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>