Skip to content

Instantly share code, notes, and snippets.

View FusRoDah061's full-sized avatar

Allex Rodrigues FusRoDah061

  • Nelogica
  • Campinas - SP
View GitHub Profile
@FusRoDah061
FusRoDah061 / dump-uwp-apps.md
Created April 3, 2021 01:24
Dump UWP apps files

Overview

Most apps and games downloaded from Microsoft Store on Windows 10 are placed on a special folder (WindowsApps), which the user probably won't have access.

That said, in case you want to use mods in a game, you'll likely need access to the it's files. Even though Microsoft introduced the option to enable mods, not all developers have adopted this yet (if some ever will). This document presents an alternative to get access to the files you may need.

This is basically a copy-paste of u/WiredRawdy's reddit post.

Requirements

@FusRoDah061
FusRoDah061 / record-xvfb.sh
Last active November 3, 2020 19:09
Records Xvfb screen by taking multiple screenshots and creating an mp4 with ffmpeg.
#!/bin/sh
# Usage example
# record-xvfb.sh /var/tmp /video $XVFBPID
xvfb_source_dir=$1
dest_dir=$2
pid=$3
echo "PID to watch: $pid"
@FusRoDah061
FusRoDah061 / my-alpine.Dockerfile
Created October 16, 2020 12:25
Alpine image for manually testing stuff when creating alpine-based docker images
FROM alpine:3.8
RUN apk add --no-cache git tar dpkg wget nano
WORKDIR /workspace
# Keep container running after startup
ENTRYPOINT ["tail", "-f", "/dev/null"]
# Build and run on terminal
@FusRoDah061
FusRoDah061 / open-browser-tabs.js
Created August 25, 2020 19:52
Abrir vários links de uma vez em guias do navegador.
let links = [
/*Inserir os links aqui como strings*/
]
let as = [];
for (let link of links) {
let a = document.createElement('A');
a.href = link;
a.target = "_blank";
@FusRoDah061
FusRoDah061 / fb-unlike.js
Created May 10, 2020 22:59
Script para descurtir múltiplas página do facebook. Rodar no dev console na página onde são mostradas as curtidas, onde cada curtida tem o botão "Curtiu", que abre um popup para descurtir. Funcionando em 10/05/2020.
var btns = document.getElementsByClassName('PageLikedButton');
var counter = 0;
var popupOpen = false;
console.log('Qtde botões: ' + btns.length);
setInterval(function () {
console.log('Counter: ' + counter);
@FusRoDah061
FusRoDah061 / git-squash.sh
Last active November 29, 2019 12:19
Easy squash method for squashing a lot of commits and conflict-proof
# assume starting branch is master, and we want to squash a bunch of commits from original_messy_branch
git checkout master
# create a new branch from master
git checkout -b new_clean_branch
# apply all changes from original_messy_branch to new_clean_branch either with
git merge original_messy_branch
# and then, forget the commits but have the changes staged for commit
git reset --soft master
@FusRoDah061
FusRoDah061 / installcomposer.bat
Last active August 27, 2019 21:45 — forked from jatubio/installcomposer.bat
Install composer as portable on Windows and increases Timeout
@ECHO OFF
REM Installs Composer as portable and setup home folder as composer global config folder and local folder as internal cache
REM v.2.0 - 01/05/2015
REM [email protected]
REM Set Home folder as Composer Global Configuration Folder
SET PATH=%PATH%;C:\xampp\php
SET COMPOSER_HOME=%~dp0Home
if not exist %COMPOSER_HOME% md "%COMPOSER_HOME%"
@FusRoDah061
FusRoDah061 / select_estados.html
Created July 30, 2019 00:54 — forked from quagliato/select_estados.html
<select> com todos os estados brasileiros
<select id="estado" name="estado">
<option value="AC">Acre</option>
<option value="AL">Alagoas</option>
<option value="AP">Amapá</option>
<option value="AM">Amazonas</option>
<option value="BA">Bahia</option>
<option value="CE">Ceará</option>
<option value="DF">Distrito Federal</option>
<option value="ES">Espírito Santo</option>
<option value="GO">Goiás</option>
@FusRoDah061
FusRoDah061 / estados-cidades.json
Created July 30, 2019 00:53 — forked from letanure/estados-cidades.json
JSON estados cidades
{
"estados": [
{
"sigla": "AC",
"nome": "Acre",
"cidades": [
"Acrelândia",
"Assis Brasil",
"Brasiléia",
"Bujari",
/*
https://stackoverflow.com/questions/1563191/cleanest-way-to-write-retry-logic/1563234?fbclid=IwAR1xkK60U07JQP8NZ0h61mWuF21AOWEfGXLrDs94PuvLI0xo7HMkdsWSQcs#1563234
Usage:
Retry.Do(() => SomeFunctionThatCanFail(), TimeSpan.FromSeconds(1));
Or
Retry.Do(SomeFunctionThatCanFail, TimeSpan.FromSeconds(1));
Or
int result = Retry.Do(SomeFunctionWhichReturnsInt, TimeSpan.FromSeconds(1), 4);
*/