Here's a bookmarklet that'll pop the current search results page's URL open in one of those annoying little JS prompt dialogs.
Show URL
Drag it to your bookmarks bar and click when needed.
The code in a nutshell:
$ grep "\.project" .gitignore | |
.project | |
$ git bisect bad | |
Bisecting: 5 revisions left to test after this (roughly 3 steps) | |
[85547ec7aa1e9087ed84f09d0f8c603b88377978] Added MIT license text to top of apns.py | |
$ grep "\.project" .gitignore | |
$ git bisect good | |
Bisecting: 11 revisions left to test after this (roughly 4 steps) | |
[9d17aa48641e3540fbc6a54c26776b45c865887b] unset badge by passing badge=0 | |
$ grep "\.project" .gitignore |
Errata Security have an interesting post on the hacking of a general's mistress. In it, Robert David Graham looks at how long it would take someone to discover Paula Broadwell's Yahoo! email password based on the hashed copy leaked in an email hack last year. He states:
it'll take 17 hours to crack her password using a GPU accelerator trying 3.5-billion password attempts per second, trying all combinations of upper/lower case and digits.
(My emphasis)
I read that and thought: clearly he's making an assumption here about the (maximum) length of the password. I wonder what the assumption was?
#!/bin/sh | |
ssl_expiry() { | |
# Show usage info if not called with a hostname | |
if [ $# -eq 0 ]; then | |
echo "Usage: ssl_expiry HOSTNAME" | |
return 0 | |
fi | |
domain=$1 |
import hashlib | |
from django.contrib.auth.hashers import PBKDF2PasswordHasher | |
class PBKDF2SHA512PasswordHasher(PBKDF2PasswordHasher): | |
""" | |
Alternate PBKDF2 hasher which uses SHA512 instead of SHA256. | |
Note: As of Django 1.4.3, django.contrib.auth.models.User defines password | |
with max_length=128 |
// GSDismissableViewControllerDelegate.h | |
// | |
// Created by Simon Whitaker at Goo Software Ltd. | |
// https://gist.github.com/simonwhitaker/4745057 | |
#import <Foundation/Foundation.h> | |
#import <UIKit/UIKit.h> | |
@protocol GSDismissableViewControllerDelegate <NSObject> | |
kill-adobe-updater() { | |
killall "AAM Updates Notifier" 2>/dev/null || echo "AAM Updater not running" | |
rm ~/Library/LaunchAgents/com.adobe.AAM.Updater-1.0.plist 2>/dev/null || echo "LaunchAgent not found" | |
} |
#import <Foundation/Foundation.h> | |
int main(int argc, const char * argv[]) { | |
@autoreleasepool { | |
// Declare some config values; the input and output file paths and the | |
// number of bytes per word | |
NSString *inputFile = @"/Users/simon/Desktop/input.dat"; | |
NSString *outputFile = @"/Users/simon/Desktop/output.dat"; |
var tweet = "Currently chilling out at W1B 2EL, then on to WC2E 8HA or maybe even L1 8JF! :-)"; | |
// Here's a simple regex that tries to recognise postcode-like strings. | |
// See http://en.wikipedia.org/wiki/Postcodes_in_the_United_Kingdom#Validation | |
// for the rules on how UK postcodes are formatted. | |
var postcode_regex = /[A-Z]{1,2}[0-9][0-9A-Z]?\s?[0-9][A-Z]{2}/g; | |
var postcodes = tweet.match(postcode_regex); | |
console.log(postcodes); |
import re | |
tweet = "Currently chilling out at W1B 2EL, then on to WC2E 8HA or maybe even L1 8JF! :-)" | |
# Here's a simple regex that tries to recognise postcode-like strings. | |
# See http://en.wikipedia.org/wiki/Postcodes_in_the_United_Kingdom#Validation | |
# for the rules on how UK postcodes are formatted. | |
postcode_regex = '[A-Z]{1,2}[0-9][0-9A-Z]?\s?[0-9][A-Z]{2}' | |
postcodes = re.findall(postcode_regex, tweet) |