Skip to content

Instantly share code, notes, and snippets.

View requeijaum's full-sized avatar

Rafael Requião requeijaum

  • Salvador, BA - Brazil
View GitHub Profile

ADS2 - Dia 2

Atividade 2.1

Item 1

$ cat /etc/passwd | grep bash root:x:0:0:root:/root:/bin/bash aluno:x:1000:1000:Aluno,,,:/home/aluno:/bin/bash aluno2:x:1001:1001::/home/aluno2:/bin/bash

ADS2 - Dia 1

Atividade 1.1

a. /etc b. /lib c. /var/log d. /tmp e. /bin e /sbin f. /run

@requeijaum
requeijaum / README.md
Created August 21, 2019 17:41 — forked from jhass/README.md
Proxy to remote server with CORS support

cors.py for mitmproxy

Hacking CORS restriction to enable in-browser XHR to any server.

Usage

Say you are running an web app at localhost, and you want to send XHR to http://remote-server:80, but the CORS restriction forbids access because you are sending requests from an origin that remote-server:80 does not allow.

Run:

@requeijaum
requeijaum / sixpair.c
Created August 20, 2019 00:14
Got from http://dancingpixelstudios.com/sixaxiscontroller/sixpair.c. It can run on Mac OS X! But it doesn't work on PowerPC Mac (Leopard), though.
/*
* sixpair.c version 2007-04-18
* Modified to run on Mac OSX by
* Erlend Cleveland 2011-09-04
*
* Compile with: gcc -o sixpair sixpair.c -lusb
*/
#include <string.h>
#include <unistd.h>
@requeijaum
requeijaum / notes.md
Last active August 20, 2019 00:14
Using sixpair on PowerPC Mac for RetroArch gaming. Before that: used sixpair from http://dancingpixelstudios.com/sixaxiscontroller/sixpair on Intel Mac (El Capitan) for injecting PowerPC Mac's BT address.

Notes

The controller almost works wirelessly, but it keeps pressing "D-pad down" button and disconnects. Since there is a warning on my PPC compiling tryout... it must be some bug.

Check this Imgur Gallery for some pics.

I also forked some fork of the original sixpair - that seems to have DualShock4 support.

May RetroArch and it's input drivers help?

@requeijaum
requeijaum / rascunho.md
Last active August 10, 2019 13:27
Circuitos Lógicos 10ago2019

TRABALHO DE CIRCUITOS LÓGICOS

Relatório

  • Precisamos de:
  • Circuito
  • Tabela Verdade
  • Mapa de Karnaugh
  • Entregar em: 17ago2019
@requeijaum
requeijaum / qemu.sh
Created July 18, 2019 21:15 — forked from mkuron/qemu.sh
QEMU Debian Netinst
#!/bin/bash
cd $(dirname $0)
arch=powerpc
ram=256
dist=jessie
mirror='http://ftp.de.debian.org/debian'
disk=debian-$dist-$arch.qcow2
@requeijaum
requeijaum / fix_pihole-FTL.sh
Last active July 18, 2019 15:53
Fix my pihole install on Odroid C2 with Ubuntu 16.04 LTS. BIND9 must be kidding with me, since pihole uses dns-masq (and we need to install a specific version of it). I have this script setup on my crontab running every 30 minutes. That's important because my little Odroid is the DNS Cache for my home LAN.
#!/bin/bash
service bind9 stop
pgrep pihole-FTL
if [ $? -gt 0 ]
then
pihole-FTL
else
echo "pihole-FTL's process is already running!"
@requeijaum
requeijaum / stop_launchd_cpu_hog.sh
Last active July 6, 2019 04:29
One-liner CPU-hog assassin for Mac OS X El Capitan UserEventAgent
sudo whoami ; locate com.apple.UserEventAgent-System | xargs sudo launchctl unload
# https://discussions.apple.com/thread/6614895
@requeijaum
requeijaum / koha_perl_deps-helper.py
Created July 3, 2019 14:12
Work In Progress: Koha Perl Dependencies Helper Script (Python 3 )
'''
Helper script for Koha 19.05.01 - Tarball stable - on armhf Ubuntu Xenial - running on my Odroid C2
It installs the most missing modules using CPAN from root shell !
Instructions:
- After running:
# perl -MCPAN -e "install Modern::Perl"
- You need to pipe the output from the PERL Dependencies Script to "missing_mods.txt":
# ./koha_perl_deps.pl -m -u > ./missing_mods.txt