Skip to content

Instantly share code, notes, and snippets.

View Mygod's full-sized avatar
👿
Payment is usually required for a response.

Mygod Mygod

👿
Payment is usually required for a response.
View GitHub Profile
@Mygod
Mygod / fp.md
Last active February 18, 2024 02:32
List of functionally perfect Pokemon in GO at level50/51

Functionally perfect at Lv50

Ivysaur, Butterfree, Ekans, Arbok, Pikachu, Raichu, Raichu-Alola, Nidoran♂, Gloom, Paras, Parasect, Venonat, Diglett, Diglett-Alola, Dugtrio, Dugtrio-Normal, Dugtrio-Alola, Growlithe-Hisuian, Doduo, Dodrio, Gengar, Onix, Drowzee, Hypno, Electrode, Electrode-Hisuian, Exeggcute, Marowak, Starmie, Omanyte, Kabutops, Snorlax, Bayleef, Feraligatr, Sentret, Furret, Hoothoot, Crobat, Togepi, Hoppip, Murkrow, Misdreavus, Snubbull, Teddiursa, Remoraid, Porygon2, Tyrogue, Combusken, Poochyena, Beautifly, Dustox, Lombre, Swellow, Pelipper, Shroomish, Breloom, Slakoth, Nincada, Lairon, Medicham, Plusle, Minun, Numel, Spoink, Spinda, Whiscash, Claydol, Kecleon, Tropius, Walrein, Clamperl, Metang, Piplup, Staraptor, Luxio, Roserade, Cranidos, Bastiodon, Wormadam, Wormadam-Trash, Pachirisu, Floatzel, Mismagius, Skuntank, Bronzong, Munchlax, Snover, Lickilicky, Togekiss, Mamoswine, Porygon Z, Probopass, Servine, Emboar, Watchog, Stoutland, Gigalith, Swoobat,

@Mygod
Mygod / max-candy.js
Last active February 20, 2021 04:45
Maximize raid candies in your browser
let lv25 = false;
let candyXl = false;
let spinap = false;
let medal = 1.4; // https://gamepress.gg/pokemongo/catchcalc#/
let bcr = 0.02; // base capture rate
let thr = 1.7; // excellent 1.7, great 1.3
let candyBonus = (candyXl ? lv25 ? 85 : 55 : 0) + 3 + 2;
let candyPinap = (spinap ? 7 : 6) + candyBonus;
let candyGrazz = 3 + candyBonus;
import android.content.Context
import android.util.AttributeSet
import android.util.Log
import android.view.MotionEvent
import android.view.View
import android.webkit.WebView
import androidx.customview.widget.ViewDragHelper
class NestedScrollingWebView @JvmOverloads constructor(context: Context,
attrs: AttributeSet? = null) : WebView(context, attrs) {
@Mygod
Mygod / gist:f5b23ed493e3b892537940ae8e2645f4
Created January 16, 2019 06:53
Cross compile iftop for mips
sudo apt-get install --install-recommends gcc-mips-linux-gnu cpp-mips-linux-gnu
# libpcap
git checkout libpcap-1.9.0
mkdir out
export LIBPCAP=`pwd`/out
./configure --host=mips-linux-gnu --prefix=$LIBPCAP
make install
# libncurses
@Mygod
Mygod / huawei.py
Created September 14, 2018 16:25
Export QQ chat history on Huawei unrooted device
#!/usr/bin/env python
import errno
import os
import sys
import codecs
import sqlite3
@Mygod
Mygod / fun.sh
Created August 19, 2018 15:51
Disable TV ads on boot
adb connect <your TV IP>
# if adb connect didn't work, try enabling network debugging via whatever means possible, e.g. root + telnetd
adb shell
# this step is optional but recommended
su
pm disable com.tpv.xmic.recommender.ebony2k15
# disable ads?
pm disable com.sharp.advert
pm disable com.tianci.ad
@Mygod
Mygod / 0001-SVGParser-comma-and-whitespace-enhancement.patch
Created February 5, 2018 01:08
SVGParser comma and whitespace enhancement for CS 184/284A spring 2018
From a818cb9ca7d4746b5508943ba6dee931ce3aa3ef Mon Sep 17 00:00:00 2001
From: Mygod <contact-git@mygod.be>
Date: Sun, 4 Feb 2018 16:59:49 -0800
Subject: [PATCH] SVGParser comma and whitespace enhancement
Please see explanation here: https://piazza.com/class/jcawl9n5m3s4s3?cid=63
---
src/svgparser.cpp | 59 ++++++++++++++++++++++++++++++++++++++-----------------
1 file changed, 41 insertions(+), 18 deletions(-)
@Mygod
Mygod / export-ble-infos.py
Last active April 22, 2024 17:14
Export your Windows Bluetooth LE keys into Linux!
#!/usr/bin/python3
"""
Copyright 2021 Mygod
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
@Mygod
Mygod / deadlock-detection.cc
Created May 18, 2017 16:41
Deadlock detection
#include <cassert>
#include <condition_variable>
#include <iostream>
#include <mutex>
#include <thread>
using namespace std;
condition_variable tester;
mutex sync0, sync1, a, b, graph_sync;
@Mygod
Mygod / poisson-disk-sampling.cc
Created April 17, 2017 08:38
Poisson Disk Sampling
#include <cmath>
#include <iostream>
#include <memory>
#include <random>
using namespace std;
#define FLOAT long double
struct Point {