I hereby claim:
- I am dreness on github.
- I am dreness (https://keybase.io/dreness) on keybase.
- I have a public key ASC1Rvj8z_bm9ZwNPfYVwoRpML2fXRgFyvlCZAvCfA3cbQo
To claim this, I am signing this object:
#!/bin/bash | |
# Create a file such as /Users/you/Documents/pftable to hold a list of IPs or subnets to throttle. | |
# Example file contents: | |
# 1.2.3.4 | |
# 2.3.4.5/16 | |
# Reset dummynet to default config | |
dnctl -f flush |
-- sqlite3 ~/Library/Messages/chat.db < recent-attachments.sql | |
-- dates in the DB are NSDate. NSDate.h says: NSTimeIntervalSince1970 978328800 | |
select | |
Datetime( | |
created_date + strftime("%s", "2001-01-01"), | |
"unixepoch", | |
"localtime" | |
) as created, | |
mime_type, |
-- sqlite3 ~/Library/Messages/chat.db < attachments-for-buddy.sql | |
-- dates in the DB are NSDate. NSDate.h says: NSTimeIntervalSince1970 978328800 | |
-- To list attachments for a specific buddy, put their handle in the 'where' clause at the end. | |
SELECT Datetime(created_date + 978328800, 'unixepoch', 'localtime'), | |
mime_type, | |
total_bytes, | |
filename | |
FROM attachment |
#!/bin/zsh | |
# | |
# Set repo's user.email to a default or alternate value based on remote domain. | |
# Because the in-flight commit info has already been set, if an email address | |
# change is needed, this commit is aborted. Retry the commit to use the new address. | |
# | |
# To automatically install custom hooks to new repos: | |
# 1) Add something like the following to ~/.gitconfig: | |
# [init] | |
# templatedir = ~/.git/templates |
## install composer | |
# mkdir dezalgo ; cd dezalgo | |
## place dezalgo.php (this file) into the new directory | |
# composer require mdwheele/zalgo | |
# php dezalgo.php --infile MyBestIRCLog --outfile MySafeIRCLog | |
<?php | |
require __DIR__ . '/vendor/autoload.php'; | |
use Zalgo\Mood; | |
use Zalgo\Soul; |
#!/bin/zsh | |
# https://gist.github.com/dreness/e61fb16dcb831adaf6ff | |
# [email protected] | |
# | |
# This script attempts to repair Quicktime Player audio recordings | |
# that become broken when Quicktime Player is interrupted while recording. | |
# AIFC files can be recovered with no additional help, however to recover | |
# M4A files, you also need the 'faad' command line tool. |
# Assumes an Apple-like layout: leaf --> issuer --> CA in exactly 3 certs | |
# The last arg to codesign specifies the code to check, by bundle or executable path, or process ID | |
codesign -d -vv --extract-certificates=cert I-didnt-edit-my-config-file | |
for i in 0 1 2 ; do openssl x509 -inform der -in cert${i} -out cert${i}.pem ; done | |
openssl ocsp -CAfile cert2.pem -issuer cert1.pem -cert cert0.pem -url $(openssl x509 -in cert0.pem -ocsp_uri -noout) | |
Example: | |
╭─ andre@flux ~ |
I hereby claim:
To claim this, I am signing this object:
#!/bin/bash | |
# extra verbose | |
set -x | |
# sync mods from local host to remote host (e.g. a minecraft server) | |
# optionally delete extraneous files in the remote mods directory | |
# Go home to allow relative paths below, but remember current dir. | |
pushd ~ |
#!/usr/bin/python | |
import json | |
import urllib2 | |
from pprint import pprint | |
# These URLs are discovered by viewing https://developer.apple.com/wwdc/live/#/ | |
# and using the web inspector to find the wwdc-streaming javascript. | |
# Currently: https://developer.apple.com/wwdc/live/scripts/app/min/wwdc-streaming-0.1.0.min.js | |
# Search that javascript for "videos.json" and "videos_live.json" |