Skip to content

Instantly share code, notes, and snippets.

View tonussi's full-sized avatar

Lucas Tonussi tonussi

View GitHub Profile
@tonussi
tonussi / herokuout.rb
Created October 10, 2013 02:44
herokuout
λ p5qpl-am citygame-ruby → λ git master → git push
Counting objects: 13, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (10/10), done.
Writing objects: 100% (11/11), 1.74 KiB, done.
Total 11 (delta 3), reused 0 (delta 0)
To https://github.com/tonussi/citygame-ruby.git
7c479ed..ff2d9bd master -> master
λ p5qpl-am citygame-ruby → λ git master → git push heroku master
Counting objects: 766, done.
@tonussi
tonussi / output.hs
Last active December 24, 2015 23:19
output.rb
λ p5qpl-am text → λ git master* → git st
# On branch master
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# ../../test/
nothing added to commit but untracked files present (use "git add" to track)
λ p5qpl-am text → λ git master* → git pull https://github.com/CarlosBonetti/citygame-ruby.git master
remote: Counting objects: 12, done.
remote: Compressing objects: 100% (2/2), done.
@tonussi
tonussi / dds.css
Last active December 24, 2015 21:29
dds.css
a {
outline: 0;
}
input::-moz-focus-inner {
border: 0;
}
a:hover, a:active, a:focus {
outline: 0;
@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 / fibi.asm
Created September 28, 2013 00:30
fibi.asm
addi $sp, $sp, -16
fib:
slt $t0, $a2, 0
add $v0, $zero, $t0
nme $t0, 0, exit
add $a0, $a0, $a1
subi $a1, $a2, 1
jal fib
@tonussi
tonussi / rename.sh
Last active December 24, 2015 01:59
rename.sh
#!/bin/sh
echo "Write the string extention ( ie .bash )\n"
echo "The program will accept multiple extention. ( ie .html.markdown )\n"
read oldext # = ".html.markdown"
echo "Write the new extention ( ie .sh )"
read newext # = ".md"
@tonussi
tonussi / ruby.rb
Last active December 24, 2015 01:29
ruby.rb
class RubySimples
def simples_acao
puts "Ruby"
end
end
# Output "I love Ruby"
say = "I love Ruby"
puts say
@tonussi
tonussi / listas2.pro
Created September 26, 2013 13:00
listas2.pro
/* 15 =====================================
* Predicado: substituidoDoInicio(D, L, LM)
* Definição: D é um dado, L é uma lista e LM é a lista L com D no lugar do primeiro dado de L.
*/
%passo-basico
substituidoDoInicio(D, L, [D | L]).
%passo-indutivo
.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 / 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 ====================