Want to create a Gist from your editor, the command line, or the Services menu? Here's how.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# sf2email v0.2 (2011-05-11) | |
# By Robert Quattlebaum <[email protected]> | |
# | |
# PUBLIC DOMAIN | |
# | |
# This shell script was originally designed to be used as the 'authors-prog' | |
# for git-svn. It takes the sourceforge username as an argument, and outputs | |
# the name and email address of the individual to stdout. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- See article here: http://daringfireball.net/2007/07/simple_inbox_sweeper | |
-- The following should be one long line: | |
set _description to "All unflagged, read messages in each IMAP account | |
inbox will be moved to the “Archive” mailbox corresponding to that | |
account. This action is not undoable." | |
tell application "Mail" | |
display alert "Archive read messages from IMAP inboxes?" buttons ¬ | |
{"Cancel", "Archive"} cancel button 1 message _description |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_ssh_auth_save() { | |
ln -sf "$SSH_AUTH_SOCK" "$HOME/.ssh/ssh-auth-sock.$HOSTNAME" | |
} | |
alias screen='_ssh_auth_save ; export HOSTNAME=$(hostname) ; screen' | |
alias tmux='_ssh_auth_save ; export HOSTNAME=$(hostname) ; tmux' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#---------------------------------------------------------------------- | |
# Flomio, Inc. - Copyright 2011 | |
# Author: Richard Grundy | |
# Date: 01/23/2011 | |
# | |
# File: flomio_client.py | |
# | |
# Description: This Flomio Client enables the scanning of RFIDs | |
# via a COTS NFC Reader based on the NXP PN533 chipset. It leverages | |
# both the USB and PC/SC interfaces to talk to the readers depending |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/expect -f | |
# | |
# VIPAccess.exp | |
# | |
# Command-line emulation of Symantec's VIP Access software token. | |
# Usage: | |
# ./VIPAccess.exp [v] | |
# If the "v" argument (or any argument) is specified, verbose output | |
# will be produced on stderr. The OTP value will be output on stdout. | |
# |
Digital cryptography! This is a subject I've been interested in since taking a class with Prof. Fred Schneider back in college. Articles pop up on Hacker News fairly often that pique my interest and this technique is the result of one of them.
Specifically, this is about Lamport signatures. There are many signature algorithms (ECDSA and RSA are the most commonly used) but Lamport signatures are unique because they are formed using a hash function. Many cryptographers believe that this makes them resistant to attacks made possible by quantum computers.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// points = number of points (minimum 3) | |
// outer = radius to outer points | |
// inner = radius to inner points | |
module Star(points, outer, inner) { | |
// polar to cartesian: radius/angle to x/y | |
function x(r, a) = r * cos(a); | |
function y(r, a) = r * sin(a); | |
// angular width of each pie slice of the star |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# trace debug-log macro | |
sudo dtrace -qn 'security_debug*:::log { printf("[%s] %s\n", copyinstr(arg0), copyinstr(arg1)); }' | |
# restart securityd | |
sudo launchctl unload /System/Library/LaunchDaemons/com.apple.securityd.plist && | |
sudo launchctl load /System/Library/LaunchDaemons/com.apple.securityd.plist |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-----BEGIN PGP PUBLIC KEY BLOCK----- | |
mQINBFReyUEBEADEahczwRsXCUXn7rT2obtAL2Novbo26Gdr8t3Fk2x0h6/OiLR0 | |
p408uckZkovb6OoJTXA/SuOXRpkPv8JOucNkabk9o8FZF2ugo9spCF7ez3IZap7Q | |
VDqGodCHbjSp17Nu7lyYquPY/pT8xqKrYtykkDxKt6S0uX9n/qUx2yVX4Id+WrsY | |
rRUaAgYGqS3Q2umf8xDJqOkHJOrw8C10pNn5pl39ccvBV8HrakvQwBVYm2214Mx8 | |
Ull2oFhdGmt4fZFdtAbw2hou0oa9e6l+tun0R874BB4exLii8x9Bgq5HROKvPhJV | |
NdfZmj0h3jT5GGihE5xmzpwWeyiHDZwINWpuQ/WmL8wtVfu+VJRjUR5KKCUt6kfN | |
9dCmwP73puQfFPnZj2azzyGdxiVmHdoNeMu9OHga81yk+RPO2CLgmhwL5BJX8N2z | |
z4z7Qd4dceqlSRSd6D3mGRIfekgs4YHfn0xFnNBlTy6010GkHBgb2rSlXqz5nQNW |
OlderNewer