Skip to content

Instantly share code, notes, and snippets.

@imAliAzhar
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
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
CalebFenton / DexFileFingerprinter.java
Created Sep 28, 2017
Fingerprinting / Hashing Dalvik Executables
View DexFileFingerprinter.java
import gnu.trove.map.TObjectLongMap;
import gnu.trove.map.hash.TObjectLongHashMap;
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
arkon / patch_boot.sh
Last active Mar 13, 2019
Bash scripts for patching boot.img/build.prop for Fate/Grand Order on LineageOS (https://goo.gl/YkHgjZ)
View patch_boot.sh
#!/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 "bootimg_tools_7.8.13.zip" from https://goo.gl/48Sszu
@graymouser
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
*/
$('a').each(function(i){
if ($.trim($(this).text()) == 'MOBI') {
$('body').append('<iframe id="dl_iframe_'+i+'" style="display:none;">');
document.getElementById('dl_iframe_'+i).src = $(this).data('web');
}
});
View libvirt-kvm-virtual-network.md

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 192.168.100.2 and the second will get 192.168.100.100. 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
* https://gist.githubusercontent.com/msmuenchen/9318327/raw/f6cbc07c01297f129700b7e14e1013253ab8b44f/gistfile1.txt
* http://blog.sharedmemory.fr/en/2014/04/30/keepass-file-format-explained/
*/
@amroamroamro
amroamroamro / README.md
Last active Sep 16, 2020
[Python] Fitting plane/surface to a set of data points
View README.md

Python version of the MATLAB code in this Stack Overflow post: http://stackoverflow.com/a/18648210/97160

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.

quadratic_surface

@grugq
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
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.