Skip to content

Instantly share code, notes, and snippets.

View alexandre's full-sized avatar
🎯
Focusing

Alexandre Souza alexandre

🎯
Focusing
View GitHub Profile
@alexandre
alexandre / racket_install_error.log
Created February 26, 2016 03:45
racket isntall error
Error [GCING] 212 in ../../../racket/gc2/../src/bool.c: Function mz_long_double_eqv declared __xform_nongcing__, but includes a function call.
Error [GCING] 248 in ../../../racket/gc2/../src/bool.c: Function double_eqv declared __xform_nongcing__, but includes a function call.
xform: Errors converting
context...:
/tmp/SBo/racket-6.3/src/build/racket/gc2/xform-collects/compiler/private/xform.rkt:8:2: xform
/tmp/SBo/racket-6.3/src/build/racket/gc2/xform-collects/xform/xform-mod.rkt: [running body]
make[4]: *** [xsrc/bool.c] Error 1
Makefile:208: recipe for target 'xsrc/bool.c' failed
make[4]: Leaving directory '/tmp/SBo/racket-6.3/src/build/racket/gc2'
make[3]: *** [all] Error 2
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import pprint
import random
import string
def generate_matrix(i_length, j_length, default_value=None):
@alexandre
alexandre / hide_text_in_2Dmatrix.py
Created November 15, 2015 16:18
Goal: hide a text or word in a simple 2D matrix...should be easier using numpy, but not more funny. =P
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import pprint
import random
import string
def generate_matrix(i_length, j_length, default_value=None):
@alexandre
alexandre / temas_legais.md
Last active December 25, 2017 21:16
Tentando organizar os temas que eu gosto em computação através de livros

Algoritmos

  • -> Introduction to Algorithms - Cormen
  • -> Art of computer programming - Knuth (????)
  • -> Purely Functional Data Structures - Okasaki
  • -> Programming Pearls

Redes

  • -> TCP/IP Illustrated - 1~3 (2ed.)
  • -> Computer Network - 5ed.
@alexandre
alexandre / games_free_software.md
Last active October 6, 2015 21:25
game development using only free software tools

libGDX

  • Link: https://github.com/libgdx/libgdx
  • Language: Java (native support), Python (using Jython as is explained here)
  • License: Apache 2.0
  • Description: libGDX is a cross-platform Java game development framework based on OpenGL (ES) that works on Windows, Linux, Mac OS X, Android, your WebGL enabled browser and iOS.
@alexandre
alexandre / wifilivre_stats.py
Last active September 25, 2015 18:44
Wifi livre SP - Teste para provar que o contador apresenta apenas multiplos de 5/10
alexandre@moes ~ $ mkproject -p $(which python3) wifilivresp-stats
#...processo de instalação
(wifilivresp-stats)alexandre@moes ~/Development/wifilivresp-stats $ pip install flask beautifulsoup4 ipython requests
# ...a ideia é deixar esse script rodando em algum lugar para ver de tempos em tempos se isso é verdade ou não
(wifilivresp-stats)alexandre@moes ~/Development/wifilivresp-stats $ ipython
Python 3.4.3 (default, Jul 28 2015, 18:20:59)
In [1]: import requests as r
In [2]: from bs4 import BeautifulSoup as bsoup
@alexandre
alexandre / prepara_tibia.sh
Last active July 7, 2024 23:00 — forked from anonymous/prepara_tibia.sh
Receita de bolo para instalar o tibia em uma distribuição linux, provavelmente um Ubuntu/Linux Mint...
# Baixar o pacote do tibia do site tibia.com
# durante a criação desse script, a versão mais recente era a 10.81
wget http://static.tibia.com/download/tibia1081.tgz
# desmontar o tar
# o comando tar é responsavel por criar e desmontar arquivos tar
# o xvf quer dizer extrair de manera verbosa e forçada. Ou seja, vai exibir todo o processo de extração e garantir que ele ocorra.
tar xvf tibia1081.tgz
# tentar rodar o jogo
@alexandre
alexandre / strategy_inheritance_noob.py
Last active August 29, 2015 14:26
misturando strategy e herança.
"""
Vamos supor que temos um numero X de clientes e cada cliente tem 2 tipos de
fechamento diferentes: fechamento parcial e fechamento geral.
Além disso, cada cliente tem um padrão para esses arquivos (cada fechamento gera um), já que esses
arquivos serão utilizados em um sistema de terceiros.
A principio, eu pensei que apenas o pattern strategy solucionava o problema...
de acordo com o cliente eu devolvia uma classe especifica que geraria o
arquivo. Mas o problema é que eu esqueci que haviam 2 tipos de fechamento.

Keybase proof

I hereby claim:

  • I am alexandre on github.
  • I am ubbersith (https://keybase.io/ubbersith) on keybase.
  • I have a public key whose fingerprint is 0879 C96E 7041 A74F 0794 9AB0 4B3C 15E4 F5CF B314

To claim this, I am signing this object:

@alexandre
alexandre / problems_to_solve.md
Last active March 27, 2019 13:58
problems_to_solve.md