Skip to content

Instantly share code, notes, and snippets.

View tomwalsh's full-sized avatar
🏠
Working from home

Tom Walsh tomwalsh

🏠
Working from home
  • Just to the left of right.
View GitHub Profile
@plasticbrain
plasticbrain / gist:3863749
Created October 10, 2012 07:34
PHP: (REGEX/preg_match) check for http(s)://
//--------------------------------------------------------------------------
// See if a url contains http:// or https://
//--------------------------------------------------------------------------
if( !preg_match('/http(s?)\:\/\//i', $url) ) {
// URL does NOT contain http:// or https://
}
@therobot
therobot / elastic-ip
Created March 29, 2013 12:50
Elastic IP corosync resource agent
#!/bin/bash
###############################################################################
# CONFIG
# AWS config
export AWS_SECRET_KEY="XXXX"
export AWS_ACCESS_KEY="XXXX"
export PATH=$PATH:/usr/local/aws/ec2/bin
export EC2_HOME=/usr/local/aws/ec2/
@philr
philr / gist:4e65c8e1d0a1357ae7f6133f749b4324
Last active October 13, 2016 16:43
GlobalSign revoked intermediate certificate OCSP response
Hypertext Transfer Protocol
GET /rootr1/MEwwSjBIMEYwRDAJBgUrDgMCGgUABBS3V7W2nAf4FiMTjpDJKg6%2BMgGqMQQUYHtmGkUNl8qJUC99BM00qP%2F8%2FUsCCwQAAAAAAURO8DYx HTTP/1.1\r\n
Host: ocsp.globalsign.com\r\n
\r\n
[Full request URI: http://ocsp.globalsign.com/rootr1/MEwwSjBIMEYwRDAJBgUrDgMCGgUABBS3V7W2nAf4FiMTjpDJKg6%2BMgGqMQQUYHtmGkUNl8qJUC99BM00qP%2F8%2FUsCCwQAAAAAAURO8DYx]
[HTTP request 1/1]
[Response in frame: 114]
Hypertext Transfer Protocol
HTTP/1.1 200 OK\r\n
Date: Thu, 13 Oct 2016 14:19:59 GMT\r\n