Skip to content

Instantly share code, notes, and snippets.

View tonussi's full-sized avatar

Lucas Tonussi tonussi

View GitHub Profile
@tonussi
tonussi / ilp.sh
Last active December 26, 2015 17:19
thread level parallelism
#!/bin/sh
echo "EEC"
echo "171 Parallel Architectures"
echo "John Owens"
echo "UC Davis"
mkdir -p $HOME/ipl/
cd $HOME/ipl/
@tonussi
tonussi / gnome-terminal-colors-tomorrow-night.sh
Created October 24, 2013 23:50
gnome terminal colors tomorrow night
#!/usr/bin/env bash
[[ -z "$PROFILE_NAME" ]] && PROFILE_NAME=Tomorrow
[[ -z "$PROFILE_SLUG" ]] && PROFILE_SLUG=Tomorrow
[[ -z "$GCONFTOOL" ]] && GCONFTOOL=gconftool
[[ -z "$BASE_KEY" ]] && BASE_KEY=/apps/gnome-terminal/profiles
PROFILE_KEY="$BASE_KEY/$PROFILE_SLUG"
gset() {
@tonussi
tonussi / arquivos.pro
Created October 24, 2013 11:09
arquivos.pro
:- dynamic animal/2.
animal(joselito, ovo).
animal(vaca, gado).
:- dynamic tipoPele/2.
tipoPele(joselito, pelo).
tipoPele(vaca, europa).
@tonussi
tonussi / animais
Last active December 26, 2015 10:09
animais
classe('mamifero') :- patas(1),glmamarias(1),pelo(1),nadadeiras(2),branquias(2),oviparo(2),asa(2).
assertClasse('mamifero') :- assert(patas(1)),assert(glmamarias(1)),assert(pelo(1)),assert(nadadeiras(2)),assert(branquias(2)),assert(oviparo(2)),assert(asa(2)).
animal('cachorro', 'mamifero').
classe(anonimous) :- patas(2),glmamarias(2),pelo(2),nadadeiras(2),branquias(2),oviparo(2),asa(2).
assertClasse(anonimous) :- assert(patas(2)),assert(glmamarias(2)),assert(pelo(2)),assert(nadadeiras(2)),assert(branquias(2)),assert(oviparo(2)),assert(asa(2)).
animal(chinforimpula, anonimous).
animal(churros, anonimous).
animal(cavalo, mamifero).
classe(maluco) :- patas(2),glmamarias(2),pelo(1),nadadeiras(1),branquias(1),oviparo(1),asa(1).
@tonussi
tonussi / id_rsa.rb
Created October 21, 2013 01:41
Enter passphrase for key '/home/tonussi/.ssh/id_rsa':
λ p5qpl-am ~ → λ git master → git push
Enter passphrase for key '/home/tonussi/.ssh/id_rsa':
Counting objects: 10, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (8/8), done.
Writing objects: 100% (8/8), 774 bytes, done.
Total 8 (delta 5), reused 0 (delta 0)
remote: => Syncing Gitorious... [OK]
To [email protected]:settings/settings.git
35fc9bd..d05eb98 master -> master
@tonussi
tonussi / CriaJogo.rb
Created October 19, 2013 02:15
CriaJogo.rb
# -*- encoding : utf-8 -*-
class CriaJogo < ActiveRecord::Migration
def self.up
create_table "jogo", :force => true do |t|
t.column :ranking, :string
t.column :jogadores, :string
end
end
@tonussi
tonussi / app-pg.sh
Last active December 25, 2015 09:29
app-pg.sh
heroku addons:add heroku-postgresql:dev
Added heroku-postgresql:dev to citygame-ruby (Free).
Attached as HEROKU_POSTGRESQL_GOLD_URL Database has
been created and is available ! This database is empty.
If upgrading, you can transfer ! data from another
database with pgbackups:restore.
@tonussi
tonussi / sinatra.rb
Created October 12, 2013 18:39
Sinatra has ended his set (crowd applauds)
______ __ ______ __ __ ______ ______ __ __ ______
/\ ___\ /\ \ /\__ _\ /\ \_\ \ /\ ___\ /\ __ \ /\ "-./ \ /\ ___\
\ \ \____ \ \ \ \/_/\ \/ \ \____ \ \ \ \__ \ \ \ __ \ \ \ \-./\ \ \ \ __\
\ \_____\ \ \_\ \ \_\ \/\_____\ \ \_____\ \ \_\ \_\ \ \_\ \ \_\ \ \_____\
\/_____/ \/_/ \/_/ \/_____/ \/_____/ \/_/\/_/ \/_/ \/_/ \/_____/
Digite 'help' a qualquer momento para visualizar os comandos disponíveis
Chame seus amigos e divirta-se :)
@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.