View flashtrick.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## To install | |
mkdir -p ~/.mozilla/plugins/ && curl -s "http://fpdownload.macromedia.com/get/flashplayer/pdc/$(curl -s 'https://helpx.adobe.com/flash-player/kb/archived-flash-player-versions.html' | grep -o '11\.2\(\.[0-9]\{3\}\)\{2\}' | sort | tail -1)/install_flash_player_11_linux.x86_64.tar.gz" | tar -x -z -C "$HOME/.mozilla/plugins/" "libflashplayer.so" | |
## To remove | |
rm ~/.mozilla/plugins/libflashplayer.so |
View server.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
// "fmt" | |
// "io" | |
"net/http" | |
"os" | |
) | |
func readSerial(w http.ResponseWriter, r *http.Request) { |
View velha.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Compilar com 'gcc -o velha.x velha.c' | |
#include <stdio.h> //printf, scanf | |
#include <stdlib.h> //rand() | |
#define printt(t) for (int i=0;i<9;i++)printf("%c%c",t[i]?t[i]:' ',(i%3==2)?'\n':' ') | |
#define eh_valida(t,j) ( (j<9&j>=0)?t[j]?0:1:0 ) | |
#define check_lin(t,c,n,i) ( t[i]+t[i+3]+t[i+6]==n*c ) | |
#define empty_lin(t,i) ( t[i]?t[i+3]?i+6:i+3:i ) | |
#define check_col(t,c,n,i) ( t[(3*i)]+t[(3*i)+1]+t[(3*i)+2]==n*c ) | |
#define empty_col(t,i) ( t[3*i]?t[(3*i)+1]?(3*i)+2:(3*i)+1:3*i ) |
View .bashrc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git_branch() { | |
GIT_STATUS="$(git status --porcelain 2> /dev/null)" | |
(( $? == 0 )) || return | |
if [[ -z "$GIT_STATUS" ]]; then | |
tput setaf 6 | |
else | |
tput setaf 5 | |
fi |
View rev.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
// Pega o ultimo elemento | |
int tail(int num, int base) { | |
return num % base; | |
} | |
// Pega o corpo, menos o ultimo elemento | |
int init(int num, int base) { | |
return num / base; |
View rev_rec.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
// base ^ power | |
int fpow(int base, int power) { | |
return (power == 1) ? 1 : base * fpow(base, power - 1); | |
} | |
// Ultimo digito do numero | |
int last(int num, int base) { | |
return num % base; |
View test.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python2 | |
from jinja2 import Template | |
from yaml import load | |
JYAML=""" | |
- name: Minimal | |
# comment | |
tasks: | |
- name: "Testando 1 2 3 {{ nome }}" |
View chroot.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- name: Exemplo | |
connection: chroot | |
hosts: chroots | |
tasks: | |
- ping: | |
### cat ./hosts | |
#[chroots] | |
#/arch ansible_python_interpreter=/usr/bin/python2 |
View coletor.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
from http import client | |
from bs4 import BeautifulSoup | |
def getElems(tr): | |
res = [] | |
for th in tr: | |
if th.string != "\n": | |
res.append(th.string) |
View repl.hy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~ hy ## From pip | |
hy 0.11.1 using CPython(default) 3.5.2 on Linux | |
=> (let [x 3] (print x)) | |
File "<input>", line 1, column 9 | |
(let [x 3] (print x)) | |
^^ | |
HyMacroExpansionError: let lexical context element must be a list or symbol | |
=> |
OlderNewer