Skip to content

Instantly share code, notes, and snippets.

View limkokhole's full-sized avatar
🌴
On vacation

林果皞 limkokhole

🌴
On vacation
View GitHub Profile
@limkokhole
limkokhole / README.md
Created July 23, 2020 06:07 — forked from mw-ferretti/README.md
Paypal button on markdown github

Steps:

<!-- Sample of code generated --> 
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="RGQ8NSYPA59FL">
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypalobjects.com/pt_BR/i/scr/pixel.gif" width="1" height="1">
@limkokhole
limkokhole / list-fftabs.py
Created July 17, 2020 11:48 — forked from tmonjalo/list-fftabs.py
List all Firefox tabs with title and URL
#! /usr/bin/env python3
"""
List all Firefox tabs with title and URL
Supported input: json or jsonlz4 recovery files
Default output: title (URL)
Output format can be specified as argument
"""
@limkokhole
limkokhole / license-badges.md
Created June 14, 2020 14:29 — forked from lukas-h/license-badges.md
Markdown License Badges for your Project

Markdown License badges

Collection of License badges for your Project's README file.
This list includes the most common open source and open data licenses.
Easily copy and paste the code under the badges into your Markdown files.

Notes

  • The badges do not fully replace the license informations for your projects, they are only emblems for the README, that the user can see the License at first glance.  

Translations: (No guarantee that the translations are up-to-date)

@limkokhole
limkokhole / strace_process_tree.py
Created June 13, 2020 03:41 — forked from mgedmin/strace_process_tree.py
Tool to help me make sense out of `strace -f` output.
in/python
# -*- coding: UTF-8 -*-
"""
Usage:
strace-process-tree filename
Read strace -f output and produce a process tree.
Recommended strace options for best results:
import java.security.KeyManagementException;
import java.security.NoSuchAlgorithmException;
import java.security.SecureRandom;
import java.security.cert.X509Certificate;
import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.HttpsURLConnection;
import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLSession;
import javax.net.ssl.TrustManager;
@limkokhole
limkokhole / random-ipv6-addr.py
Created April 14, 2020 16:45 — forked from wido/random-ipv6-addr.py
Generate a random IPv6 address
#!/usr/bin/env python3
"""
Generate a random IPv6 address for a specified subnet
"""
from random import seed, getrandbits
from ipaddress import IPv6Network, IPv6Address
subnet = '2001:db8:100::/64'
@limkokhole
limkokhole / Linux Static IP
Created April 8, 2020 14:46 — forked from fernandoaleman/Linux Static IP
How To Configure Static IP On CentOS 6
## Configure eth0
#
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
NM_CONTROLLED="yes"
ONBOOT=yes
HWADDR=A4:BA:DB:37:F1:04
TYPE=Ethernet
BOOTPROTO=static
@limkokhole
limkokhole / installFromBundle
Created February 26, 2020 20:16 — forked from keyboardsurfer/installFromBundle
Build & extract a set of apk from an aab for a specific device and install the results on it.
#!/bin/sh
# Build & extract a set of apk from an aab for a specific device and install the results on it.
#
# This needs https://github.com/google/bundletool to be available as `bundletool`.
# Also **exactly** one device needs to be connected to adb.
# Usage: installFromBundle bundle.aab
# optional `--extract-apks` to keep the set on your workstation as well.
basename=${1%%.*}
keystore="~/.android/debug.keystore"
@limkokhole
limkokhole / installFromAAB.sh
Created February 26, 2020 20:15 — forked from riyaz/installFromAAB.sh
Install the app in device from aab
#!/bin/sh
# One step wrapper to install aab to connected device, it downloads bundletool if its missing and signs the app with android debug certifiate.
#
# Usage: installFromAAB install-aab <local-aab-path>
BASENAME="${1##*/}"
KEYSTORE=~/.android/debug.keystore
KS_ALIAS="androiddebugkey"
PASS="pass:android"
@limkokhole
limkokhole / redirect.py
Created February 13, 2020 16:15 — forked from rbonvall/redirect.py
Redirect both stdin and stdout of a process to a PyQt text edit.
from PyQt4 import QtGui, QtCore, uic
def p(x):
print x
class MainWindow(QtGui.QMainWindow):
def __init__(self):
QtGui.QWidget.__init__(self)
uic.loadUi('redirect.ui', self)