Skip to content

Instantly share code, notes, and snippets.

View cauefcr's full-sized avatar

Cauê Felchar cauefcr

View GitHub Profile
@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
@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 / 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 / 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();
package main
import "net/http"
import "os"
func main() {
fs := http.FileServer(http.Dir(os.Args[1]))
http.Handle("/", http.StripPrefix("/", fs))
http.ListenAndServe(":"+os.Args[2], nil)
@cauefcr
cauefcr / webpaper.go
Last active July 29, 2019 22:07
sets the input url as wallpaper every x seconds
package main
import (
"fmt"
"image"
"log"
"os"
"path/filepath"
"strconv"
"strings"

Keybase proof

I hereby claim:

  • I am cauefcr on github.
  • I am cauefcr (https://keybase.io/cauefcr) on keybase.
  • I have a public key ASBqn10WBtpgxfG6RQSYPk9g6VhLCVCDzXpgBhrZ7VNGjwo

To claim this, I am signing this object:

@cauefcr
cauefcr / quine.js
Created December 4, 2020 17:08
javascript quine
const main = () => {
var toSource = require("tosource-polyfill");
console.log(toSource(main)+";\nmain();");
};
main();
@cauefcr
cauefcr / restify.js
Created December 5, 2020 21:11
restification
"use strict";
const pretty = require('js-object-pretty-print').pretty;
// Object.prototype.toString = function() { return pretty(this); };
const esprima = require('esprima');
const fs = require("fs");
const toSource = require("tosource");
const olhada = (coisa) => {
console.log(pretty(coisa));
return coisa;