Skip to content

Instantly share code, notes, and snippets.

Gustavo Rodrigues qgustavor

Block or report user

Report or block qgustavor

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@qgustavor
qgustavor / ackc.md
Created Jul 20, 2019
Problemas em Acchi Kocchi de BakeSubs-MDS
View ackc.md

Problemas em Acchi Kocchi de BakeSubs-MDS

Episódio 1

  • 14:54 - "Tsumiki-san" foi escrito como "sumiki-san".
    Correção: Tsumiki-san, queres provar um pouco do meu almoço?
  • 14:46 - "sede" foi escrito como "cede".
    Correção: Antes da batalha, vamos matar a sede.
  • 14:56 - Na fala Io-kun, costumas vir ao salão de jogos? a Hime diz "Io-kun-tachi", logo ela está falando com o "Io-kun e companhia" (provavelmente Io e Tsumiki). Por algum motivo todas as traduções para o Inglês que conferi ignoram esse detalhe, mas na minha opinião isso seria melhor se isso fosse corrigido.
    Correção: Vocês costumam vir ao salão de jogos?
@qgustavor
qgustavor / crunchyroll-better-controls.user.css
Last active Apr 8, 2019
Userstyle that makes Crunchyroll controls stay in place
View crunchyroll-better-controls.user.css
@-moz-document url-prefix("https://static.crunchyroll.com/vilos/player.html") {
.vjs-pause-screen.active {
background: none!important;
}
.client .vjs-pause-screen {
display: none!important;
}
@media all and not (display-mode: fullscreen) {
.client .vjs-control-bar.paused.out {
opacity: 1!important;
@qgustavor
qgustavor / index.html
Created Sep 25, 2018
MEGA URL checksum: check if some file matches a MEGA file URL like a checksum
View index.html
<!DOCTYPE html><html lang="en"><meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>MEGA URL checksum</title><style>body{margin:40px auto;max-width:650px;
font:1.1em/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
color:#444;padding:0 10px}h1,h2,h3{line-height:1.2}
label{display:flex;flex-direction:row}input{width:100%;margin-left:1em}
@media print{body{max-width:none}}</style>
<h1>MEGA URL checksum</h1>
@qgustavor
qgustavor / id-mapping.yml
Last active Jul 22, 2018
MyAnimeList to AniList ID mapping special cases
View id-mapping.yml
# https://myanimelist.net/anime/29317/ - Saenai Heroine no Sodatekata: Ai to Seishun no Service-kai
- myanimelist:29317:1 -> anilist:20657:1
- myanimelist:23277:1-12 -> anilist:20657:2-13
# https://myanimelist.net/anime/30885/ - Noragami Aragoto OVA
- myanimelist:30885:1-2 -> anilist:20494:3-4
# https://myanimelist.net/anime/32553/ - Nisekoi: OVA
- myanimelist:32553:1-2 -> anilist:20728:4-5
View moved.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@qgustavor
qgustavor / tss.js
Created Jul 11, 2018
Time Series Synchronization (not working, I don't know why)
View tss.js
// Source: http://lexfridman.com/fast-cross-correlation-and-time-series-synchronization-in-python/
// Using: https://github.com/nicolaspanel/numjs
function cross_correlation_using_fft (x, y) {
let f1 = nj.fft(x)
let f2 = nj.fft(nj.flip(y, 1))
let cc = nj.ifft(f1.multiply(f2)).slice(0, [0, 1])
return fftshift(cc)
}
// shift < 0 means that y starts 'shift' time steps before x
View Errata - Koe no Katachi - Hacchi Fansub - V1.ass
[Script Info]
;
; -------------------------------------------------------------------------------------------------------
;
; Legenda de errata para o anime Koe no Katachi traduzido por Hacchi Fansub.
; Feito com base no arquivo "[Hacchi Fansub]_Koe no Katachi [BD 1080p][H264 AAC 8 Bits] [D43A8EFC].mkv"
; Provavelmente também funciona com a versão 720p do mesmo anime.
;
; Para usar baixe a legenda e o vídeo, abra o vídeo e carregue essa legenda no vídeo.
; Se você estiver lendo isso no GitHub há um botão para download na parte superior direita da página.
@qgustavor
qgustavor / 1 - explainer.md
Created Feb 23, 2018
WhatsApp Web Location Tool
View 1 - explainer.md

WhatsApp Web Location Tool

Save the code below as a bookmarklet then open it in WhatsApp Web:

javascript:(function(){if(!window.Store||!window.Store.Chat)return window.alert("You need to open WhatsApp in order to continue");var c=window.Store.Chat.filter("active")[0];if(!c)return window.alert("You need to open a chat in order to continue");var b=window.prompt("Provide a Google Maps URL:");if(b){var a=/@(.*)\//g;if(!a.test(b))return window.alert("Please provide a valid URL");a=b.match(a)[0];a=a.slice(1,a.lastIndexOf(","));b=c.createMessageFromText("/9j/2wBDAAMCAgICAgMCAgIDAwMDBAYEBAQEBAgGBgUGCQgKCgkICQkKDA8MCgsOCwkJDRENDg8QEBEQCgwSExIQEw8QEBD/yQALCAABAAEBAREA/8wABgAQEAX/2gAIAQEAAD8A0s8g/9k=");
b.type="location";a=a.split(",");b.lat=parseFloat(a[0]);b.lng=parseFloat(a[1]);c.addAndSendMsg(b)}})();

Why

@qgustavor
qgustavor / Pipimi.svg
Last active Feb 21, 2018
Pipimi & Popuko
View Pipimi.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View 01_shuffle-fn-comparison.js
let originalArray = [1, 2, 3, 4, 5]
let functions = {
sort: arr => arr.sort(() => Math.random() - 0.5),
swap: arr => {
// Fisher–Yates shuffle
for (let i = arr.length - 1; i > 0; i--) {
const j = Math.floor(Math.random() * (i + 1))
;[arr[i], arr[j]] = [arr[j], arr[i]];
}
You can’t perform that action at this time.