Skip to content

Instantly share code, notes, and snippets.

View thiagopnts's full-sized avatar
phew

Thiago Pontes thiagopnts

phew
View GitHub Profile
;(function(){
var UIRootWidget = (function() {
var cache = new WidgetCache();
var render = function() {
$.getJSON('entities', function(entities) {
draw(entities);
});
};
var itemClicked = function(entity) {
@thiagopnts
thiagopnts / TableInstanceListing.js
Last active December 18, 2015 13:18
the description for this gist
;(function() {
var TableInstanceListing = function(id) {
$.getJSON('entities/' + id + '/instances', function(jsonObj) {
draw(jsonObj);
});
var buildTableHead = function(json, table) {
tHead = $('<thead>');
@thiagopnts
thiagopnts / gif.rb
Last active December 17, 2015 12:29
Creates a gif based on images.
require 'optparse'
require 'rmagick'
options = {}
OptionParser.new do |opts|
opts.banner = "Usage: gify image1.jpg image2.jpg"
opts.on("-v", "--verbose", "Run verbosely") do |v|
options[:verbose] = v
@thiagopnts
thiagopnts / binary_tree.py
Created October 13, 2012 05:32
binary tree python implementation
class Node:
def __init__(self, left=None, right=None, key=None, value=None):
self.left = left
self.right = right
self.key = key
self.value = value
_ = (
255,
lambda
V ,B,c
:c and Y(V*V+B,B, c
-1)if(abs(V)<6)else
( 2+c-4*abs(V)**-0.4)/i
) ;v, x=1500,1000;C=range(v*x
);import struct;P=struct.pack;M,\
#user nobody;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
<article class="comment">
<div class="balloon"></div>
<a class="comment-img" href="#non">
<img src="images/foto.png" alt="" width="50" height="50">
</a>
<div class="comment-body">
<div class="text">
<p>{{feed.text}}</p>
</div>
module.exports = class FeedView extends View
template: template
initialize: ->
super
@delegate 'click', '.apagar', @removeFeed
removeFeed: ->
@model.destroy()
View = require 'views/base/view'
utils = require 'lib/utils'
mediator = require 'mediator'
class SignupView extends View
el: $("#cadastro")
initialize: ->
@delegate 'click', '#cadastrar', @signup
@delegate 'click', '.close', @close
@thiagopnts
thiagopnts / Foca no código
Created August 29, 2012 00:57 — forked from pedrocss/Foca no código
Foca no código
/* Véi, foca no código
.---.
/o o\
__(= " =)__
//\'-=-'/\\
) (_
/ `"=-._
/ \ ``"=.