Skip to content

Instantly share code, notes, and snippets.

View gabetax's full-sized avatar

Gabe Martin-Dempesy gabetax

  • Zendesk
  • San Francisco
  • 14:29 (UTC -07:00)
View GitHub Profile
<?xml version="1.0" encoding="UTF-8"?>
<!--Sample XML file generated by XMLSpy v2008 sp1 (http://www.altova.com)-->
<tns:submission xsi:schemaLocation="aca ACASubmission.xsd" xmlns:tns="aca" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<submissionYear>2011</submissionYear>
<business>
<businessType>Manufacturer</businessType>
<businessName>Business Name xyz</businessName>
</business>
<practitionerGroups>
<practitionerGroup>
@gabetax
gabetax / gist:b81d097792364d88eff0
Created April 16, 2015 22:30
SSL Certificate subject collision with alternate public keys / subject key identifiers
-----BEGIN CERTIFICATE-----
MIIFLjCCBBagAwIBAgIQAw6VKU2uwSwDzzGrWwJx1zANBgkqhkiG9w0BAQUFADBv
MQswCQYDVQQGEwJTRTEUMBIGA1UEChMLQWRkVHJ1c3QgQUIxJjAkBgNVBAsTHUFk
ZFRydXN0IEV4dGVybmFsIFRUUCBOZXR3b3JrMSIwIAYDVQQDExlBZGRUcnVzdCBF
eHRlcm5hbCBDQSBSb290MB4XDTAwMDUzMDEwNDgzOFoXDTIwMDUzMDEwNDgzOFow
YjELMAkGA1UEBhMCVVMxITAfBgNVBAoTGE5ldHdvcmsgU29sdXRpb25zIEwuTC5D
LjEwMC4GA1UEAxMnTmV0d29yayBTb2x1dGlvbnMgQ2VydGlmaWNhdGUgQXV0aG9y
aXR5MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA5Lx+kjBtxtiOKwu8
Rs7gJ5be3vn6EtM8M3OzBC+8cYzln7YiYD5fXc4J/4IMG5pRUBomid3VYV0Z3BIP
LQqiQ10X0DSSIOpzzzgsBiYJenL3+lAy+MKT02miI85Bsczk1R820Yo6+Ixj4hRZ
@gabetax
gabetax / gist:311766
Created February 23, 2010 02:08
PHP error handler. Converts all errors to logged exceptions. Warnings are displayed, errors are thrown.
<?php
function ChitinErrorHandler ($errno, $errstr, $errfile, $errline, $errcontext) {
$e = new ErrorException($errstr, 0, $errno, $errfile, $errline);
error_log($e);
switch ($errno) {
case E_STRICT:
// Fuck E_STRICT. Seriously.
break;
case E_NOTICE:
@gabetax
gabetax / org.apache.httpd.plist
Created May 26, 2010 15:31
Modification of /System/Library/LaunchDaemons/org.apache.httpd.plist for passing in strings for the built-in MacOSX (10.6 Snow Leopard and 10.7 Lion) Apache
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Disabled</key>
<true/>
<key>Label</key>
<string>org.apache.httpd</string>
<key>ProgramArguments</key>
<array>
@gabetax
gabetax / qmail-klepto.patch
Created August 30, 2010 18:16
qmail-klepto - blackhole all emails to be delivered locally
diff -u qmail-1.03/qmail-send.c qmail-1.03-patch/qmail-send.c
--- qmail-1.03/qmail-send.c Mon Jun 15 05:53:16 1998
+++ qmail-1.03-patch/qmail-send.c Fri May 7 13:40:17 2004
@@ -159,7 +159,20 @@
if (!stralloc_cat(&rwline,&addr)) return 0;
if (!stralloc_0(&rwline)) return 0;
- return 2;
+
+ /* 2003-08-29
@gabetax
gabetax / deploy.rb
Created January 5, 2012 20:21
Capistrano deploy.rb for Rails 3.2 apps
# http://gembundler.com/deploying.html
require 'bundler/capistrano'
# http://guides.rubyonrails.org/asset_pipeline.html
load 'deploy/assets'
# http://beginrescueend.com/integration/capistrano/
# Also add rvm-capistrano to your Gemfile
require "rvm/capistrano" # Load RVM's capistrano plugin.
set :rvm_type, :system # Copy the exact line. I really mean :system here
@gabetax
gabetax / gist:2304167
Created April 4, 2012 17:40
git autocrlf input example
gabebug@Gabe-Work ~/Sites $ git init crlf
Initialized empty Git repository in /Users/gabebug/Sites/crlf/.git/
gabebug@Gabe-Work ~/Sites $ cd crlf/
gabebug@Gabe-Work ~/Sites/crlf $ git config core.autocrlf
input
gabebug@Gabe-Work ~/Sites/crlf $ vim crlf.txt
gabebug@Gabe-Work ~/Sites/crlf $ xxd crlf.txt
0000000: 610d 0a62 0d0a 630d 0a a..b..c..
gabebug@Gabe-Work ~/Sites/crlf $ git add crlf.txt
warning: CRLF will be replaced by LF in crlf.txt.
@gabetax
gabetax / .vimrc.after
Created April 19, 2012 14:40
My vimrc for use with janus
noremap <C-h> <C-w>h
noremap <C-j> <C-w>j
noremap <C-k> <C-w>k
noremap <C-l> <C-w>l
nnoremap <left> :3wincmd <<cr>
nnoremap <right> :3wincmd ><cr>
nnoremap <up> :3wincmd +<cr>
nnoremap <down> :3wincmd -<cr>
@gabetax
gabetax / .gitconfig
Created May 31, 2012 21:12
my .gitconfig
[color]
diff = auto
status = auto
branch = auto
[color "diff"]
whitespace = red reverse
[core]
#whitespace=fix,-indent-with-non-tab,trailing-space,cr-at-eol
autocrlf = input
#safecrlf = true
@gabetax
gabetax / orbeon-encoding-test.log
Created September 13, 2012 17:30
Output of Orbeon log when viewing http://localhost:8080/ops/encoding-test/?message=it%E2%80%99s%20a%20message
2012-09-13 12:30:02,150 INFO ProcessorService - /encoding-test/ - Received request
2012-09-13 12:30:02,252 INFO DebugProcessor - request parameters:
line 12, column 83 of oxf:/apps/encoding-test/model.xpl
<request>
<parameters>
<parameter>
<name>message</name>
<value>it???s a message</value>
</parameter>