Skip to content

Instantly share code, notes, and snippets.

View cauefcr's full-sized avatar

Cauê Felchar cauefcr

View GitHub Profile
@cauefcr
cauefcr / all_dag_paths
Last active April 23, 2018 18:22
generate all paths from a DAG
// https://bl.ocks.org/cjrd/raw/6863459/
// draw your DAG, download the json
// authors: Cauê Felchar, José Henrique Roquette
g = <your json>
dag_all_paths = function(g,start,end){
dict = new Map();
dictname = new Map();
@cauefcr
cauefcr / divider.py
Created April 27, 2017 19:40
divide o arquivo binário gerado pelo mips-assembler em 4 aquivos com 8 bits, de modo que o hades possa ler tais arquivo, por padrão funciona com ROMs de 1KB
#!/bin/python3
import sys
# utilização:
# chmod +x divider.py
# ./divider.py nome_do_arquivo_com_o_binario nome_do_arquivo_saida
# ou "python3 divider.py" etc
def main(args):
if len(args) > 2:
f = open(args[1],'r')
@cauefcr
cauefcr / explode.c
Created April 2, 2017 14:37
C string splitting (explode)
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
// return structure
struct str_explode_out {
size_t count;
char *strings[];
};
@cauefcr
cauefcr / init.sh
Created March 17, 2016 16:09
my init script
#!/bin/bash
#mouse
synclient LeftEdge=1726
synclient RigthEdge=4858
synclient TopEdge=1577
synclient BottomEdge=3665
synclient FingerLow=25
Synclient FingerHigh=30
synclient MaxTapTime=180
synclient MaxTapMove=192
@cauefcr
cauefcr / loginUTFPR.py
Last active June 17, 2016 11:26 — forked from magnuspedro/loginUTFPR.py
Auto Login UTFPR
#!/usr/bin/python3
import requests,re,getpass,sys,base64,logging
logging.captureWarnings(True)
requests.packages.urllib3.disable_warnings()
url_utf = "https://1.1.1.1/login.html"
def login(ra,senha):
global dbg