Skip to content

Instantly share code, notes, and snippets.

View morkin1792's full-sized avatar

Vinícius morkin1792

  • Recife, Brazil
View GitHub Profile
@morkin1792
morkin1792 / v.sh
Last active January 13, 2017 12:10
Tentativa de fazer um gerenciador de pacotes que não dependa de root e sirva para distros não baseadas em debian.
#!/bin/bash
tmp='/tmp'
tdir="$tmp"/v #local de arquivo temporario
mkdir -p "$tdir"
link='https://packages.debian.org'
search="/search?keywords="
word="gimp" #nome exemplo de pesquisa
arch='amd64'
@morkin1792
morkin1792 / maze.lua
Last active May 21, 2017 18:26
Algoritmo Gerador de Mazes com base no Algoritmo de divisão recursiva.
-- Fonte algorítmo: https://en.wikipedia.org/wiki/Maze_generation_algorithm#Recursive_division_method
math.randomseed(os.time())
function generate(x, y) --gera uma table de table com # e ' ' no centro representando uma maze
local r = {}
for i=1,y do
local ry = {}
for j=1, x do
if i ~= 1 and i~=y and j~=1 and j~=x then -- se não for das bordas
table.insert(ry, ' ')
else
@morkin1792
morkin1792 / grub.cfg
Last active December 28, 2018 00:05
grub multiboot com tudo funcionando
#Multiboot USB - https://gist.github.com/morkin1792
#1.
#Instalar grub:
# grub-install --target=i386-pc --root-directory=/local/usb/montado /dev/sdX --force #instala grub no modo pc/bios
# grub-install --target=x86_64-efi --root-directory=/local/usb/montado /dev/sdX --removable #instala grub no modo uefi
#2.
#para instalar no modo uefi a particao do grub deve ser fat32 (esp partition), já no modo pc pode-se usar outros sistemas de arquivos
#as isos podem ficar em qualquer particao com 'qualquer' sistemas de arquivos, apenas deve-se setar o uuid dessa mais abaixo
#pode-se instalar em ambos os modos, pc/bios e uefi, se nao for feito apenas pcs com suporte para o modo escolhido bootarao o pendrive
@morkin1792
morkin1792 / sign.sh
Created January 5, 2019 02:50
temp sign apk
### speedo sign
local="$(cd "$(dirname "$0")"; pwd)"
cd "$local"
rm -f key.keystore
echo -en 'abc123\nabc123\n\n\n\n\n\n\nyes\n' | keytool -genkey -keystore key.keystore -alias alias -keyalg RSA -validity 10000 2>/dev/null >&2||
echo -en 'abc123\nabc123\n\n\n\n\n\n\nsim\n' | keytool -genkey -keystore key.keystore -alias alias -keyalg RSA -validity 10000 2>/dev/null
echo 'Signing...'
@morkin1792
morkin1792 / error.js
Last active December 9, 2019 19:55
crazy js
const test1 = (name) => {
console.log(name)
{
console.log(name)
}
}
const test2 = (name) => {
console.log(name)
@morkin1792
morkin1792 / google_play.md
Created March 7, 2020 21:56
tuto to install google play store on an android device

getting Google Play Store

Install in order:

  • com.google.android.gsf (Google Services Framework): specific version for each android (8,9,10)
  • com.google.android.gms (Google Play Service): get latest version on apkmirror
  • com.google.android.syncadapters.contacts (Google Contacts Sync): specific version for each android (8,9,10)
  • com.google.android.syncadapters.calendar (Google Calendar Sync): get latest on apkmirror (probably very recent versions only work on new android)
  • com.android.vending (Google Play Store): get latest version on apkmirror
@morkin1792
morkin1792 / yc2audio.js
Last active May 19, 2020 23:23
download audio from youtube channels
const axios = require('axios')
const fs = require('fs')
const req = async (url) => {
return await axios.get(url, { headers: { 'X-YouTube-Client-Name': 1, 'X-YouTube-Client-Version': '2.20200514.05.00', 'X-YouTube-Page-CL': 311468061 } })
}
const getAudio = async (url) => {
const resp = await req('https://youtube.com' + url + '&pbj=1')
if (resp.status == 200 && resp.data[2]?.player) {
@morkin1792
morkin1792 / core.sh
Last active May 28, 2020 14:13
Um script para alertar quando o preco de um produto ficar ao menor ou igual a um determinado valor.
#!/usr/bin/env bash
start=$(date +%s)
link="$1"
price="$2"
command="$3"
function end() {
echo -e '\nBoas compras...\nRodou por '$(($(date +%s)-start))' segundos'
exit 0
import os
from prompt_toolkit import PromptSession
from prompt_toolkit.completion import WordCompleter
from prompt_toolkit.history import FileHistory
#https://python-prompt-toolkit.readthedocs.io/en/master/pages/asking_for_input.html#history
class Console():
def __init__(self):
self.session = PromptSession(

adding BURP (or another) ca certificate in android

Firstly export the certificate: Proxy > Options > Import/Export CA certificate > DER Format or download this via http://burp

without root

  • put the certificate in android, access with a file manager, and install for "VPN and apps" (can be needed to rename the extension 'der' to 'cer')
  • since android 7 (nougat), Apps that target API Level 24 and above no longer trust user or admin-added CAs for secure connections, by default. [1]

with root