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
@rbrito
rbrito / README.md
Last active November 2, 2015 16:18 — forked from hubgit/README.md
Remove metadata from a PDF file, using exiftool and qpdf. Note that embedded objects may still contain metadata.

Anonymising PDFs

PDF metadata

Metadata in PDF files can be stored in at least two places:

  • the Info Dictionary, a limited set of key/value pairs
  • XMP packets, which contain RDF statements expressed as XML

PDF files

@waaghals
waaghals / hyperboria.sh
Last active December 10, 2015 04:48 — forked from cantor/hyperboria.sh
Ugly PIDfiles
#!/bin/sh -e
### BEGIN INIT INFO
# hyperboria.sh - An init script (/etc/init.d/) for cjdns
# Provides: cjdroute
# Required-Start: $remote_fs $network
# Required-Stop: $remote_fs $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Cjdns router
# Description: A routing engine designed for security, scalability, speed and ease of use.
@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
@pdp7
pdp7 / torrc
Created September 6, 2014 06:47
DigitalOcean non-exit relay /etc/tor/torrc
ORPort 443
Exitpolicy reject *:*
Nickname EFFisMyHero
ContactInfo <pdp7pdp7 AT gmail dot com> GPG: 0x84D44A9317F1138E
Log notice file /var/log/tor/notices.log
RelayBandwidthRate 1024 KB
RelayBandwidthBurst 1024 KB
MaxAdvertisedBandwidth 1024 KB
DisableDebuggerAttachment 0
@volodymyrsmirnov
volodymyrsmirnov / sip.py
Last active January 28, 2017 04:02
SIP Wav Caller CLI
#/usr/bin/env python
import sys
from application.notification import NotificationCenter
from sipsimple.account import AccountManager
from sipsimple.application import SIPApplication
from sipsimple.core import SIPURI, ToHeader
from sipsimple.lookup import DNSLookup, DNSLookupError
@davidvanvickle
davidvanvickle / remove-exif.sh
Created May 17, 2012 20:24
Remove EXIF data from JPG
# show EXIF data
exiftool image.jpg
# first install exiftool, then use "-All=" to wipe all EXIF data from JPG
# this will modify image.jpg and create backup file image.jpg_original
exiftool -All= image.jpg
@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
@james-see
james-see / securing_wordpress_guide.md
Last active January 25, 2018 10:47
A ever-evolving guide on how I lockdown a new digital ocean wordpress droplet.

This guide is meant to be a signpost to guide the way, not a dictionary to memorize. Your mileage may vary. Two great sites to check speed and security: http://tools.pingdom.com/fpt/ & https://securityheaders.io

Initial setup

GET DIGITAL OCEAN

Buy a new Digital Ocean droplet with Wordpress pre-installed ($10 per month).

CREATE USERS AND LOCK DOWN SSH

ssh into the new instance based on the credentials Digital Ocean provided.

@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
"""
Configuration example for ``ptpython``.
Copy this file to ~/.ptpython/config.py
"""
from __future__ import unicode_literals
from prompt_toolkit.filters import ViInsertMode
from prompt_toolkit.key_binding.input_processor import KeyPress
from prompt_toolkit.keys import Keys
from pygments.token import Token