Skip to content

Instantly share code, notes, and snippets.

View InFog's full-sized avatar
🤔
Thinking

Evaldo Bento InFog

🤔
Thinking
View GitHub Profile
@InFog
InFog / Torne-se Excelente
Created August 30, 2010 01:03 — forked from viniciusteles/gist:556029
Torne-se Excelente
By Klaus Wuestefeld
1) Torne-se excelente.
Seja realmente bom em alguma coisa. Não fique só choramingando ou
querendo progredir às custas dos outros. Não pense q pq vc sentou 4
anos numa faculdade ouvindo um professor falar sobre software q vc
sabe alguma coisa. Jogador de futebol não aprende a jogar bola tendo
aula. Ele pratica. Instrumentistas geniais nao aprendem a tocar tendo
aula. Eles praticam. Pratique. Chegue em casa depois do trabalho e da
@InFog
InFog / php_horror.php
Created March 20, 2011 15:44
PHP HORROR!
<?php
/**
* PHP HORROR!
*/
$____ = 'value';
echo $____;
@InFog
InFog / oo.js
Created March 31, 2011 12:36
Um exemplo pequeno de OO em JavaScript
/**
* Objeto Usuario (Classe)
*/
Usuario = function(nome, email) {
this.nome = nome;
this.email = email;
};
// Métodos do objeto Usuario
Usuario.prototype.pegarNome = function() {
@InFog
InFog / bashrc.sh
Created May 3, 2011 13:40
Exibir os branches do Git e do Mercurial (hg) no prompt do Bash
# Adicione essas funções ao final do seu arquivo ~/.bashrc
# Branches do Git
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ \[GIT:\1\]/'
}
# Branches do Mercurial
parse_hg_branch() {
thisbranch=`hg branch 2> /dev/null`
@InFog
InFog / cassia.py
Created June 7, 2011 01:53
Para Cássia
#!/usr/bin/python
from commands import getoutput
from time import sleep
while True:
out = ''
for l in 'Te Amo Cassinha!':
out += l
if l == ' ':
@InFog
InFog / about.md
Created August 22, 2011 13:07 — forked from PotHix/about.md
Programming Achievements: How to Level Up as a Developer
@InFog
InFog / hgrc
Created August 25, 2011 23:46 — forked from bralpassos/Arquivo de configuração do Mercurial
Arquivo de configuração do Mercurial
[ui]
username = infog
editor = vim
verbose = True
[extensions]
# relevância dos desenvolvedores (em linhas)
churn =
@InFog
InFog / a.php
Created September 3, 2011 16:56
Associações que vão gerar MUITA CONFUSÃO na sua sessão da tarde
<?php
$a = 'b';
$t = array(
(isset($a)) ? 'Sim' : 'Não' => (isset($a)) ? 'Sim' : 'Não',
'a' => ($a == 'c') ? 'A = C' : 'A != C'
);
print_r($t);
@InFog
InFog / .bashrc
Created October 6, 2011 23:25
My .bashrc
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# don't put duplicate lines in the history. See bash(1) for more options
# don't overwrite GNU Midnight Commander's setting of `ignorespace'.
export HISTCONTROL=$HISTCONTROL${HISTCONTROL+,}ignoredups
@InFog
InFog / burp.md
Created March 13, 2012 12:31
How to code drunk

How to code drunk

Some people born with it, some people are self-taught on this, some people just discover how. How about a guide on how to code great software while still drunk as a cow?

Rules

  • You can add your patterns by forking this gist.
  • You must be drunk before sending a pattern.