Skip to content

Instantly share code, notes, and snippets.

derwentx derwentx

Block or report user

Report or block derwentx

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
derwentx / snippet-index-decoded.php
Last active Nov 13, 2018
Snippets from my analysis of the wp gdpr compliance hack
View snippet-index-decoded.php
View Debian Stretch on my Mid-2014 Macbook Pro 11,3
derwentx /
Created Dec 7, 2017
My "one-liner" macro for pformatting and inserting it into the clipboard for analysis. I'd suggest using a snippet manager which supports cursor insertion (like Dash) to avoid having to scroll backwards to replace the @cursor placeholder. I have this mapped to ;ppc
import pyperclip, pprint; pyperclip.copy( pprint.pformat( @cursor ) )
derwentx /
Last active Dec 7, 2017 — forked from EdwardBetts/
My "one-liner" macro for pformatting an object with colour. I'd suggest using a snippet manager which supports cursor insertion (like Dash) to avoid having to scroll backwards to replace the @cursor placeholder. I have this mapped to ;cpp
from pygments import highlight; from pygments.lexers import PythonLexer; from pygments.formatters import Terminal256Formatter; from pprint import pformat; print(highlight(pformat( @cursor ), PythonLexer(), Terminal256Formatter()))
#!/usr/bin/env python
from __future__ import print_function
import sys
import time
import re
# import pyuarm
import yaml
from pprint import pformat
derwentx /
Last active Nov 16, 2019
Safely dual boot macOS Sierra with Filevault2 and Debian Stretch with rEFInd and cross-mounting

Dual Boot encrypted macOS Sierra and Debian Stretch


I wanted a safe, encrypted Debian install, parallel to my existing macOS install that I could nuke trivially at a moment's notice and would leave very little evidence behind. In my setup, if I zero'd partitions sda4->sda7 (can be done trivially from macOS or Debian), the next time I rebooted, it would revert to the original EFI System Partition, and I would be greeted by an unblemished factory macOS bootloader. Even if I was asked to decrypt my OS at customs, there would be no evidence of a previous debian install.


Do not attempt this guide if you are not familiar with linux. YOU WILL NUKE YOUR COMPUTER AND EVERYONE YOU LOVE WILL DIE. Please first read through the whole guide and make sure you are familiar with the utilities we will be using.

derwentx / .zshrc
Last active May 9, 2019
My macOS setup. Run commands from
View .zshrc
# Path to your oh-my-zsh installation.
export ZSH=~/.oh-my-zsh
# ZSH customization
plugins=(git, zsh-autosuggestions, zsh-syntx-highlighting, brew, npm, z, colorize, autopep8, cabal, dirhistory, lein, macports, osx, perl, pep8, python, pip, sublime, taskwarrior, wd, vi-mode, zsh_reload)
bindkey -v
source $ZSH/
derwentx / 1_notmnist_derwent.ipynb
Created Jun 22, 2017
My solutions to the Udacity Tensor Flow Assignment 1
View 1_notmnist_derwent.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
derwentx / .htaccess
Last active Jun 27, 2017
Here's how to fix 404s caused by disabling qTranslatex plugin. Change en|fr to a list of | separated language codes.
View .htaccess
# BEGIN Derwent qTranslatex mods
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^(en|fr)(/.*|)$ $2 [L,NC,R=301]
# END Derwent qTranslatex mods
derwentx / 0_reuse_code.js
Last active Jun 1, 2017
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
You can’t perform that action at this time.