Skip to content

Instantly share code, notes, and snippets.

View james-see's full-sized avatar
🍀
make your own luck

JC james-see

🍀
make your own luck
View GitHub Profile
@james-see
james-see / irssi-add-freenode.txt
Created June 20, 2017 01:44
commands to add freenode to irssi
/network add freenode
/server add -auto -net freenode -ssl -ssl_verify chat.freenode.net 6697
@robertpainsi
robertpainsi / commit-message-guidelines.md
Last active August 15, 2025 22:31
Commit message guidelines

Commit Message Guidelines

Short (72 chars or less) summary

More detailed explanatory text. Wrap it to 72 characters. The blank
line separating the summary from the body is critical (unless you omit
the body entirely).

Write your commit message in the imperative: "Fix bug" and not "Fixed
bug" or "Fixes bug." This convention matches up with commit messages
@aallan
aallan / mac-vendor.txt
Last active August 11, 2025 14:51
List of MAC addresses with vendors identities
000000 Officially Xerox
000001 SuperLAN-2U
000002 BBN (was internal usage only, no longer used)
000003 XEROX CORPORATION
000004 XEROX CORPORATION
000005 XEROX CORPORATION
000006 XEROX CORPORATION
000007 XEROX CORPORATION
000008 XEROX CORPORATION
000009 powerpipes?
@hewerthomn
hewerthomn / install-oh-my-zsh.sh
Created January 26, 2017 11:30
Offline install of oh-my-zsh on Ubuntu
main() {
# Use colors, but only if connected to a terminal, and that terminal
# supports them.
if which tput >/dev/null 2>&1; then
ncolors=$(tput colors)
fi
if [ -t 1 ] && [ -n "$ncolors" ] && [ "$ncolors" -ge 8 ]; then
RED="$(tput setaf 1)"
GREEN="$(tput setaf 2)"
YELLOW="$(tput setaf 3)"
@bzamecnik
bzamecnik / decrypt_pdf.py
Created January 18, 2017 07:54
Decrypt password-protected PDF in Python.
# Decrypt password-protected PDF in Python.
# cleaned-up version of http://stackoverflow.com/a/26537710/329263
#
# Requirements:
# pip install PyPDF2
#
# Usage: decrypt_pdf('encrypted.pdf', 'decrypted.pdf', 'secret_password')
from PyPDF2 import PdfFileReader, PdfFileWriter
@roadrunner2
roadrunner2 / 0 Linux-On-MBP-Late-2016.md
Last active August 23, 2025 20:33
Linux on MacBook Pro Late 2016 and Mid 2017 (with Touchbar)

Introduction

This is about documenting getting Linux running on the late 2016 and mid 2017 MPB's; the focus is mostly on the MacBookPro13,3 and MacBookPro14,3 (15inch models), but I try to make it relevant and provide information for MacBookPro13,1, MacBookPro13,2, MacBookPro14,1, and MacBookPro14,2 (13inch models) too. I'm currently using Fedora 27, but most the things should be valid for other recent distros even if the details differ. The kernel version is 4.14.x (after latest update).

The state of linux on the MBP (with particular focus on MacBookPro13,2) is also being tracked on https://github.com/Dunedan/mbp-2016-linux . And for Ubuntu users there are a couple tutorials (here and here) focused on that distro and the MacBook.

Note: For those who have followed these instructions ealier, and in particular for those who have had problems with the custom DSDT, modifying the DSDT is not necessary anymore - se

@kevin-smets
kevin-smets / 1_kubernetes_on_macOS.md
Last active June 23, 2025 01:06
Local Kubernetes setup on macOS with minikube on VirtualBox and local Docker registry

Requirements

Minikube requires that VT-x/AMD-v virtualization is enabled in BIOS. To check that this is enabled on OSX / macOS run:

sysctl -a | grep machdep.cpu.features | grep VMX

If there's output, you're good!

Prerequisites

@james-see
james-see / setup_py_forgetmenot.txt
Last active June 27, 2018 02:29
python setup.py cheats
git tag 0.1.5 -m "Added backwards compatibility for < Python 2.2.3."
git push --tag
python setup.py register -r pypi
python setup.py sdist upload -r pypi
@james-see
james-see / irssi_otr.sh
Last active August 7, 2016 20:12
irssi and otr in ubuntu (because I can't get it to work in OSX at all yet) and with certs for OFTC
mkdir ~/Downloads
cd ~/Downloads
wget https://otr.cypherpunks.ca/libotr-4.1.1.tar.gz
tar -xzf libotr-4.1.1.tar.gz
cd libotr-4.1.1
sudo apt-get install automake libtool autoconf irssi-dev tor git bitlbee-plugin-otr irssi-plugin-otr libgcrypt-dev gcc libglib2.0-dev -y
./configure --prefix=/usr && make && sudo make install
mkdir ~/projects
cd ~/projects
git clone https://github.com/cryptodotis/irssi-otr.git
@rms1000watt
rms1000watt / python-extract-after-scrape.py
Created July 13, 2016 15:31
Python script to extract phone numbers and emails from html pages that were web scraped
import re
import glob
def main():
outputFile = 'output.tsv'
files = glob.glob('*.html')
print "Extracting from %s files" %(len(files))
data = []