Skip to content

Instantly share code, notes, and snippets.

View bradleypeabody's full-sized avatar

Brad Peabody bradleypeabody

View GitHub Profile
@bradleypeabody
bradleypeabody / ecdsa-more-curves.go
Created August 2, 2016 16:52
Example of supporting additional elliptic curves for ECDSA to sign and verify with different key sizes. (Example uses curves with bit sizes smaller than P224 to achieve shorter signatures. Signatures are compatible with standard stuff like OpenSSL.)
package main
import (
"crypto/ecdsa"
"crypto/elliptic"
"crypto/rand"
"crypto/sha256"
"crypto/x509"
"crypto/x509/pkix"
"encoding/asn1"
@anaynayak
anaynayak / url_requests.js
Created October 9, 2013 13:38
phantom.js script to log all http requests from a page
var page = require('webpage').create(),
system = require('system'),
address;
if (system.args.length === 1) {
console.log('Usage: phantomjs url_requests.js http://some.url.com');
phantom.exit(1);
} else {
address = system.args[1];
var logUrl = function (req) {
@zroger
zroger / httpd.conf
Created July 13, 2013 14:58
Minimal httpd.conf for running apache in the foreground for local php development.
#
# Minimal httpd.conf for running apache in the foreground for local php
# development.
#
# Setup:
# 1. Place this file in the root of your project.
# 2. Make sure the ./tmp directory exists (for the pid and lock files).
# 3. Update the DocumentRoot and Directory directives with the relative path to
# your project's document root.
#
@rechargecar
rechargecar / CANTest.ino
Created November 30, 2012 19:10
MCP2515 Library example
/*
MCP2515 CAN Interface Using SPI
Author: David Harding
Created: 11/08/2010
Modified: 6/26/12 by RechargeCar Inc.
For further information see: