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
@requeijaum
requeijaum / MySQL.md
Created July 28, 2018 14:11 — forked from nrollr/MySQL.md
Install MySQL on El Capitan using Homebrew

Install MySQL on OS X El Capitan

Normally the installation of MySQL can be achieved with a single command, which executes a script provided by MacMiniVault : bash <(curl -Ls http://git.io/eUx7rg)

However, at the time of writing the script is not compatible with OS X El Capitan (10.11)

Install MySQL using Homebrew

An alternative to the aforementioned installation script is installing MySQL using Homebrew. This gist assumes you already have Homebrew installed, if not first read the article "Homebrew and El Capitan"

Make sure Homebrew has the latest formulae, so run brew update first

@requeijaum
requeijaum / Doc API
Created March 31, 2019 22:20 — forked from rgr2k/Doc API
SambaVideos API
SambaVideos API!
=====================
Este documento descreve os recursos que compõem a API do **SambaVideos**. Se você tiver quaisquer problemas ou pedidos, por favor, contate o suporte clicando aqui.
----------
Conteúdo
-------
@requeijaum
requeijaum / hax.c
Created May 9, 2019 18:14 — forked from apsun/hax.c
Hook main() using LD_PRELOAD
/*
* Hook main() using LD_PRELOAD, because why not?
* Obviously, this code is not portable. Use at your own risk.
*
* Compile using 'gcc hax.c -o hax.so -fPIC -shared -ldl'
* Then run your program as 'LD_PRELOAD=$PWD/hax.so ./a.out'
*/
#define _GNU_SOURCE
#include <stdio.h>
@requeijaum
requeijaum / check_intermedium_private_key_leak.sh
Created May 15, 2019 00:30 — forked from guilhermednt/check_intermedium_private_key_leak.sh
Verifying Banco Intermedium's private key leak
# Today the twitter user @ayubio said he had received the private key for a Brazillian bank's HTTPS certificate:
# - https://twitter.com/ayubio/status/994260981294469120
# - https://twitter.com/ayubio/status/994262029929246722
# - https://twitter.com/ayubio/status/994277992351391744
# To prove he actualy had the key, another user asked him to sign a message with such key and so he did:
# - http://pastebin.xyz/p?q=bXllODA
# The commands bellow will check that signature
# Store the message in a file (tweet.txt) in the same way @ayubio did:
@requeijaum
requeijaum / emuparadise.download.user.js
Created June 20, 2019 17:41 — forked from infval/emuparadise.download.user.js
emuparadise.me download workaround (Most games + Sega Dreamcast, Books/Comics/Guides/Magazines)
// ==UserScript==
// @name EmuParadise Download Workaround
// @version 1.2.2
// @description Replaces the download button link with a working one
// @author infval (Eptun)
// @match https://www.emuparadise.me/*/*/*
// @grant none
// ==/UserScript==
// https://www.reddit.com/r/Piracy/comments/968sm6/a_script_for_easy_downloading_of_emuparadise_roms/
@requeijaum
requeijaum / test_unicode.php
Created June 23, 2019 02:26 — forked from Daniel-KM/test_unicode.php
Check and fix Unicode issues on a web server with php
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
</head>
<body>
<h1>Check Unicode on a web server with php</h1>
<p>If your filenames requires characters with diacritics or any Unicode characters and not only the strict latin characters (26 letters + 10 numbers + some symbols and punctuation marks), the web server should be checked and fixed.</p>
@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 / 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 / estados-cidades.json
Created March 7, 2020 22:39 — forked from letanure/estados-cidades.json
JSON estados cidades do brasil, dividido por estados. segunda lista atualizada em 2020, dados do IBGE
{
"estados": [
{
"sigla": "AC",
"nome": "Acre",
"cidades": [
"Acrelândia",
"Assis Brasil",
"Brasiléia",
"Bujari",
@requeijaum
requeijaum / WP-Query
Created May 8, 2020 07:17 — forked from farrukhmomin/WP-Query
SQL Query to get Latest Wordpress Post with Featured Image.
select DISTINCT wp_posts.id, wp_posts.post_title, wp_posts.post_content, wp_posts.post_type, featured_image.guid as post_image, wp_posts.post_modified, wp_users.display_name
from wp_posts
inner join wp_postmeta on wp_posts.id = wp_postmeta.post_id and wp_postmeta.meta_key = '_thumbnail_id'
inner join wp_posts as featured_image on featured_image.id = wp_postmeta.meta_value
inner join wp_users on wp_users.id = wp_posts.post_author
where wp_posts.post_status = 'publish'
order by wp_posts.ID desc
limit 10