Skip to content

Instantly share code, notes, and snippets.

View tonussi's full-sized avatar

Lucas Tonussi tonussi

View GitHub Profile
@tonussi
tonussi / blogspot_to_jekyll.rb
Created August 4, 2012 18:05 — forked from kennym/blogspot_to_jekyll.rb
Migrate your blogger blog posts to jekyll.
#!/usr/bin/env ruby
#
# Convert blogger (blogspot) posts to jekyll posts
#
# Basic Usage
# -----------
#
# ./blogger_to_jekyll.rb feed_url
#
# where `feed_url` can have the following format:
@tonussi
tonussi / coderwall_widget_div.html
Created August 12, 2012 01:41 — forked from lp/coderwall_widget_div.html
HTML DIV for Coderwall Widget
<div id="coderwall_badges">
<script
type="text/javascript"
src="http://coderwall-widget.appspot.com/coderwallbadges.js/tonussi">
</script>
<script>
new CoderwallWidget({
'color':'#000',
'#fff':'#000',
'width':245,
@tonussi
tonussi / factorial.py
Created November 22, 2012 17:37 — forked from ghoseb/factorial.py
The evolution of a Python Programmer
#Newbie programmer
def factorial(x):
if x == 0:
return 1
else:
return x * factorial(x - 1)
print factorial(6)
#First year programmer, studied Pascal
<html>
<head>
<title> cibeleborg </title>
<style>
body {
background: url("http://24.media.tumblr.com/tumblr_lgjl1fsev41qh644lo1_500.jpg") repeat;
}
</style>
</head>
<body>
@tonussi
tonussi / Fila.java
Created June 28, 2013 17:13 — forked from senhorinha/Fila.java
Resolução questão Fila
public class Fila {
private final int[] dados;
private int inicio, fim, contador;
private final int max;
public boolean filaCheia() {
return contador == max;
}
@tonussi
tonussi / lista.pro
Created September 25, 2013 16:48 — forked from senhorinha/lista.pro
/* 01 =====================
* Predicado: primeiro(L,P)
* Definição: L é uma lista e P é o primeiro dado de L.
*/
primeiro([P|_],P).
/* 02 ====================
.data
#Arranjo a ser ordenado
_v: .word 29,28,27,26,25,24,23,22,21,-1
_k: .word 2 #Valor de k
.text
.globl main
main:
#Inicialização dos parâmetros
la $a0, _v
@tonussi
tonussi / big.c
Created October 6, 2013 06:14 — forked from BohuTANG/big.c
/*
* Such as num is:12345678910, 'from_big1' funcation will be wrong
* since the sign extension: 'cltq' instruction will full fill upper 32 bits with 0xffffffff
*/
#include <stdlib.h>
#include <stdint.h>
#include <stdio.h>
#include <inttypes.h>
void to_big(unsigned char *buf, uint64_t v)
@tonussi
tonussi / config.json
Created January 5, 2016 07:37 — forked from anonymous/config.json
Bootstrap Customizer Config
{
"vars": {
"@gray-base": "#000",
"@gray-darker": "lighten(@gray-base, 13.5%)",
"@gray-dark": "lighten(@gray-base, 20%)",
"@gray": "lighten(@gray-base, 33.5%)",
"@gray-light": "lighten(@gray-base, 46.7%)",
"@gray-lighter": "lighten(@gray-base, 93.5%)",
"@brand-primary": "darken(#428bca, 6.5%)",
"@brand-success": "#5cb85c",
@tonussi
tonussi / ForwardDiff_Foley_vanDam.pde
Created May 10, 2016 23:21 — forked from awangenh/ForwardDiff_Foley_vanDam.pde
COMPUTE AND DRAW A BICUBIC SURFACE PATCH USING FORWARD DIFFERENCES - This code implements and provides corrections to the algorithm named DrawSurfaceFwdDif presented in Fig.11.46 at page 525 of the book Computer Graphics - Principles and Practice 2.ed in C by James D.Foley et.al.
/* ============================================================================= *
* COMPUTE AND DRAW A BICUBIC SURFACE PATCH USING FORWARD DIFFERENCES *
* *
* This code implements and provides corrections to the algorithm named *
* DrawSurfaceFwdDif presented in Fig.11.46 at page 525 of the book *
* Computer Graphics - Principles and Practice 2.ed in C by Jamed D.Foley et.al. *
* This algorithm was neither corrected nor repeated in the 3rd (present) *
* edition of Foley et.al.'s book. *
* *
* The algorithm, as stated in the book, does not work: There is one error and *