Skip to content

Instantly share code, notes, and snippets.

View stagas's full-sized avatar
🤸

stagas stagas

🤸
View GitHub Profile
$(document).ready(function() {
var $book = $('#book')
// wrapping the function in a closure
;(function display_icon() {
$book.hide(1000, function() {
$book.show(1000, function() {
setTimeout(function() {
display_icon();
}, 0);
});
$(function() {
var $body = $('body')
, $book = $('#book')
;(function animate_background() {
$body.animate({ backgroundColor: "#abcdef" }, 1000, function(){
$body.animate({ backgroundColor: "#000" }, 1000, animate_background)
})
}())
@stagas
stagas / protocol.js
Created December 31, 2011 11:41
Thinking about a human-readable multi-line pubsub api for irc bots...
var EventEmitter = require('events').EventEmitter,
util = require('util');
// TODO:
// * tags (BEGIN somehashhere\nsomehashhere data)
// * line numbers (begin somehash\nsomehash:12 data)
var Buffer = exports.Buffer = function (o) {
o = o || {};
@stagas
stagas / LICENSE.txt
Created May 26, 2011 06:58 — forked from 140bytes/LICENSE.txt
Padding for Strings and Numbers
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 George Stagas https://github.com/stagas
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@stagas
stagas / TestFboChangeBuffer.cpp
Created September 11, 2020 15:48 — forked from roxlu/TestFboChangeBuffer.cpp
Comparing the performance of different ping/pong techniques when using FBOs. One version uses two fbos and swaps between these, the other switches the draw and read buffer. See these results https://docs.google.com/spreadsheets/d/1ZyTQGkjYQajQtu8OvgRyaXJl46F4rZJStBCEK2kebgE/edit?usp=sharing for a comparison. It seems that switching read / draw b…
#include <poly/Log.h>
#include <TestFboChangeBuffer.h>
using namespace poly;
TestFboChangeBuffer::TestFboChangeBuffer()
:fbo(0)
,dx(0)
{
tex[0] = 0;