Skip to content

Instantly share code, notes, and snippets.

View jpouellet's full-sized avatar

Jean-Philippe Ouellet jpouellet

View GitHub Profile
@jpouellet
jpouellet / keybase.md
Last active August 29, 2015 14:00
Keybase "proof" linking github.com/jpouellet and keybase.io/jpo

Please don't trust keybase for anything important. I view them as just another 3rd party and centralized point of failure.

Keybase is not a substitute for the web of trust and proper verification! Please don't treat it as such!

I don't trust the keybase wrapper for gpg, and I certainly don't trust crypto in my browser.

That said... I believe crypto should be used more in general, and if the

@jpouellet
jpouellet / posix.html
Created October 30, 2014 08:11
Allows POSIX documentation to be searched as a "Search Engine" in Chromium / Google Chrome.
<!DOCTYPE html>
<html>
<head>
<title>POSIX search wrapper</title>
<meta name="description" content="because Chrome search engines can't use POST requests" />
<script type="text/javascript">
window.addEventListener('load', function() {
document.getElementsByTagName('span')[0].textContent = window.location + '#%s';
var query = window.location.hash.substr(1);
if (query.length > 0) {
@jpouellet
jpouellet / foobar.m
Created November 3, 2014 08:32
OS X text status-item
#include <AppKit/AppKit.h>
#include <stdio.h>
#include <signal.h>
static void
handler(int sig __attribute((unused)))
{
close(STDIN_FILENO);
}
@jpouellet
jpouellet / Info.plist.template
Last active August 29, 2015 14:19
Build OS X App with GNU Make
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleExecutable</key>
<string>${BIN}</string>
<key>CFBundleIconFile</key>
<string>${ICNS}</string>
</dict>
</plist>
@jpouellet
jpouellet / vhash.sh
Created September 30, 2015 02:49
Verify hashes non-visually. Too many people only compare the first and/or last few hex digits, which is too easy to collide.
#!/bin/sh
z=$(basename "$0")
err() {
printf "%s: %s\n" "$z" "$1" >&2
exit 1
}
usage() {
@jpouellet
jpouellet / quicklook-pager.sh
Last active December 28, 2015 18:09
Uses OS X's "Quick Look" as a pseudo-pager.
#!/bin/bash
# It'd be nice to allow users to pipe stuff into this and have it displayed.
# I had it working, but then I added the press-any-key-to-close functionality
# because clicking the X was annoying, and that consumes stdin.
#
# Ideally this would cause the window manager to focus on the quicklook window,
# which would be responsable for closing itself, but qlmanage seems to not be
# capable of doing that (at least as of 10.6.8).
#
@jpouellet
jpouellet / wikipedia-summary.js
Created December 15, 2013 18:24
Gets the first paragraph of a wikipedia query. I'm sure there's a better way.
#!/usr/bin/env phantomjs
var system = require('system');
// because console.error currently goes to stdout
console.error = system.stderr.writeLine;
if (system.args.length !== 2) {
console.error('usage: ' + system.args[0] + ' query');
phantom.exit(1);
@jpouellet
jpouellet / nasm-wrapper.sh
Last active March 28, 2016 11:21
Script to do simple one-liner nasm-format assembly/disassembly from the command line
#!/usr/bin/env bash
# do simple one-liner nasm-format assembly/disassembly from the command line
arch=i386
syntax=gas
usage() {
cat > /dev/null << EOF
usage: $0 [-a arch] [-s syntax] instruction
#!/usr/bin/env python
from pwn import *
r=remote('198.186.190.107', 4000)
r.sendafter('what name', sys.argv[1]+'\n')
r.sendafter('Password', sys.argv[2]+'\n')
log=open('mud.log', 'a')
@jpouellet
jpouellet / pocsag-twitter.sh
Created August 8, 2016 02:36
POCSAG decoder dumping to twitter
# Had gqrx running at 443.500 MHz, setup as in https://www.bastibl.net/pocsag/.
decode() {
nc -l -u -p 7355 \
| sox -t raw -esigned-integer -b 16 -r 48000 - -esigned-integer -b 16 -r 22050 -t raw - \
| multimon-ng -t raw -a POCSAG512 -a POCSAG1200 -a POCSAG2400 -p -f alpha - \
>> ~/dc/pocsag-decoded.log
}
tweet() {