Skip to content

Instantly share code, notes, and snippets.

imAliAzhar / emoji-list
Last active Jul 18, 2020
Create an Emoji selector menu with Rofi
View emoji-list
<span lang="face with tears of joy"> 😂 </span>
<span lang="grinning face with smiling eyes"> 😄 </span>
<span lang="grinning face with sweat"> 😅 </span>
<span lang="face with rolling eyes"> 🙄 </span>
<span lang="smirking face"> 😏 </span>
<span lang="smiling face with halo"> 😇 </span>
<span lang="grinning face"> 😀 </span>
<span lang="squinting face with tongue"> 😝 </span>
<span lang="grinning face with big eyes"> 😃 </span>
<span lang="unamused face"> 😒 </span>
douglasrizzo / inconsistent-authors-bib.ipynb
Last active Mar 22, 2020
Merging inconsistent author names in a bib file
View inconsistent-authors-bib.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
CalebFenton /
Created Sep 28, 2017
Fingerprinting / Hashing Dalvik Executables
import org.jf.dexlib2.Opcode;
import org.jf.dexlib2.iface.ClassDef;
import org.jf.dexlib2.iface.DexFile;
import org.jf.dexlib2.iface.Field;
import org.jf.dexlib2.iface.Method;
import org.jf.dexlib2.iface.MethodImplementation;
import org.jf.dexlib2.iface.instruction.Instruction;
arkon /
Last active Mar 13, 2019
Bash scripts for patching boot.img/build.prop for Fate/Grand Order on LineageOS (
#!/usr/bin/env bash
# This script replaces "ro.debuggable=1" with "ro.debuggable=0" in the
# default.prop file in a ROM's boot.img and gives you the patched boot.img.
# Prerequisites:
# - A UNIX system (with `unzip`)
# - These tools added to your PATH:
# - Android dev tools (adb/fastboot)
# - Various tools in "" from
graymouser / hb_all_books_dl.js
Created Feb 28, 2016
Humble bundle book bundles - download all books at once
View hb_all_books_dl.js
After purchasing a humble book bundle, go to your download page for that bundle.
Open a console window for the page and paste in the below javascript
if ($.trim($(this).text()) == 'MOBI') {
$('body').append('<iframe id="dl_iframe_'+i+'" style="display:none;">');
document.getElementById('dl_iframe_'+i).src = $(this).data('web');

Create private networks with libvirt

I assume that you have a running debian wheezy host with libvirt and qemu/kvm installed. You need two guest VMs for this. The first guest will get the IP and the second will get All following commands must be run with sudo or under root.

Internal Network

We create a new network named internal with libvirt and use it with the IP

View gist:7789b93119df777465ea
/* global Buffer */
* Decrypt KeePass files
* There are some sources where you can find description about the keepass file format
amroamroamro /
Last active Sep 16, 2020
[Python] Fitting plane/surface to a set of data points

Python version of the MATLAB code in this Stack Overflow post:

The example shows how to determine the best-fit plane/surface (1st or higher order polynomial) over a set of three-dimensional points.

Implemented in Python + NumPy + SciPy + matplotlib.


grugq / gist:03167bed45e774551155
Last active Sep 6, 2020
operational pgp - draft
View gist:03167bed45e774551155

Operational PGP

This is a guide on how to email securely.

There are many guides on how to install and use PGP to encrypt email. This is not one of them. This is a guide on secure communication using email with PGP encryption. If you are not familiar with PGP, please read another guide first. If you are comfortable using PGP to encrypt and decrypt emails, this guide will raise your security to the next level.

turbinenreiter / serialplot2
Created Mar 5, 2014
plotting data from serial port with matplotlib
View serialplot2
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.animation as animation
import serial
fig, ax = plt.subplots()
line, = ax.plot(np.random.rand(10))
ax.set_ylim(-5000, 5000)
xdata, ydata = [0]*100, [0]*100
raw = serial.Serial("/dev/ttyUSB1",9600)
You can’t perform that action at this time.