Skip to content

Instantly share code, notes, and snippets.

🌴
On vacation

林果皞 limkokhole

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

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 Jul 17, 2020 — forked from tmonjalo/list-fftabs.py
List all Firefox tabs with title and URL
View list-fftabs.py
#! /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 Jun 14, 2020 — forked from lukas-h/license-badges.md
Markdown License Badges for your Project
View license-badges.md

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 Jun 13, 2020 — forked from mgedmin/strace_process_tree.py
Tool to help me make sense out of `strace -f` output.
View strace_process_tree.py
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:
View HttpsTrustManager.java
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 Apr 14, 2020 — forked from wido/random-ipv6-addr.py
Generate a random IPv6 address
View random-ipv6-addr.py
#!/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 Apr 8, 2020 — forked from fernandoaleman/Linux Static IP
How To Configure Static IP On CentOS 6
View Linux Static IP
## 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 Feb 26, 2020 — forked from keyboardsurfer/installFromBundle
Build & extract a set of apk from an aab for a specific device and install the results on it.
View installFromBundle
#!/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 Feb 26, 2020 — forked from riyaz/installFromAAB.sh
Install the app in device from aab
View installFromAAB.sh
#!/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 Feb 13, 2020 — forked from rbonvall/redirect.py
Redirect both stdin and stdout of a process to a PyQt text edit.
View redirect.py
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)
You can’t perform that action at this time.