View cryptopals_set_8.md

Cryptopals is a set of cryptographic challenges, originally published here: https://cryptopals.com

Set 8 of the challenges was never published publicly, until late March 2018. However the cryptopals website was not updated to include the challenges. This gist compiles the 8th set of the Cryptopals challenges.

title link
57. Diffie-Hellman Revisited: Small Subgroup Confinement https://toadstyle.org/cryptopals/513b590b41d19eff3a0aa028023349fd.txt
58. Pollard's Method for Catching Kangaroos https://toadstyle.org/cryptopals/3e17c7b35fcf491d08c989081ed18c9a.txt
59. Elliptic Curve Diffie-Hellman and Invalid-Curve Attacks https://toadstyle.org/cryptopals/a0833e607878a80fdc0808f889c721b1.txt
View yubikey-reset.sh
gpg-connect-agent <<EOF
/hex
scd serialno
scd apdu 00 20 00 81 08 40 40 40 40 40 40 40 40
scd apdu 00 20 00 81 08 40 40 40 40 40 40 40 40
scd apdu 00 20 00 81 08 40 40 40 40 40 40 40 40
scd apdu 00 20 00 81 08 40 40 40 40 40 40 40 40
scd apdu 00 20 00 83 08 40 40 40 40 40 40 40 40
scd apdu 00 20 00 83 08 40 40 40 40 40 40 40 40
scd apdu 00 20 00 83 08 40 40 40 40 40 40 40 40
View pr.md

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

View temp-testing-curl.php
/**
* Gets the PURL from the Friendbuy API.
*
* @param string e-mail address
* @returns object API Response
*/
function friendbuy_get_purl( $email ) {
// Verify param is actually an e-mail
if ( ! is_email( $email ) ) {
View Customfile
config.vm.provider :hyperv do |v, override|
override.vm.box = "ericmann/trusty64"
end
config.vm.synced_folders.each do |id, options|
# Make sure we use SMB for file mounts on Windows
if ! options[:type] && Vagrant::Util::Platform.windows?
options[:type] = "smb"
end
end
View keybase.md

Keybase proof

I hereby claim:

  • I am ericmann on github.
  • I am eamann (https://keybase.io/eamann) on keybase.
  • I have a public key whose fingerprint is F7CA EACB D776 6264 C62E 0B32 9DC3 CED2 E6A0 7E86

To claim this, I am signing this object:

View autoloader.php
<?php
/**
* MU-Plugin Autoloader
*
* @author Eric Mann <eric@eamann.com>
* @license MIT
* @copyright 2015 Eric Mann
*/
if ( ! defined( 'ABSPATH' ) ) {
View gist:296897ca4195afe4eca5
<?php
$query_timer = 0;
add_filter( 'do_parse_request', function( $parse ) {
global $query_timer;
$query_timer = microtime( true );
return $parse;
View gist:d73806e773e1b1765af4

Ghost is an open source platform for blogging founded by John O'Nolan and Hannah Wolfe. It's a node.js application and therefore works great in conjunction with nginx. This guide will will help you create a high performance nginx virtual host configuration for Ghost.

"Don't use #nodejs for static content" - @trevnorris. If #nginx isn't sitting in front of your node server, you're probably doing it wrong.

— Bryan Hughes (@nebrius) August 30, 2014
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>

The node.js application runs on a port on your server. We can configure nginx to proxy to this port and also cache so that we don't need to rely on express, the default n

View gist:8929492
<?php
class My_Post_Work {
public function __construct() {
add_action( 'init', array( $this, 'custom_rewrites' ) );
add_filter( 'posts_results', array( $this, 'make_trash_public' ), 10, 2 );
add_filter( 'the_posts', array( $this, 'make_trash_private' ), 10, 2 );
}