Skip to content

Instantly share code, notes, and snippets.

View edwardgalligan's full-sized avatar

Ed Galligan edwardgalligan

View GitHub Profile

Keybase proof

I hereby claim:

  • I am lucideer on github.
  • I am lucideer (https://keybase.io/lucideer) on keybase.
  • I have a public key whose fingerprint is 531E 009E 19E8 FEFF F841 3DA1 F379 B28A 2343 155A

To claim this, I am signing this object:

@edwardgalligan
edwardgalligan / install-cacert-roots.sh
Last active August 29, 2015 14:22
Install CACert.org Root Certificates
#!/bin/bash
sudo mkdir -p /usr/local/share/ca-certificates
wget https://raw.githubusercontent.com/INOPIAE/CAcert/master/www/certs/root.crt https://raw.githubusercontent.com/INOPIAE/CAcert/master/www/certs/class3.crt
sudo mv root.crt /usr/local/share/ca-certificates/cacert-root.crt
sudo mv class3.crt /usr/local/share/ca-certificates/cacert-class3.crt
sudo update-ca-certificates
@edwardgalligan
edwardgalligan / generate-hosts.sh
Created February 2, 2016 16:26
Generates /etc/hosts entries from Apache vhosts
#!/bin/bash
##
# Usage:
# generaate-hosts.sh 127.0.0.1
#
# Generates:
# 127.0.0.1 vhost1.domain
# 127.0.0.1 vhost1.domainalias1
# etc.
@edwardgalligan
edwardgalligan / Vagrantfile
Created March 7, 2016 11:46
Logic to check for stuff pre-vagrantbox boot pre-provision
if !File.file?(File.dirname(__FILE__) + '/.vagrant/machines/default/virtualbox/id') &&
# INSERT EXTRA CONDITIONS HERE
puts 'Stuff needed for proper provisioning not found'
puts 'Please ensure the proper stuff is in the proper place'
exit 1
end
/**
* document.createElement re-implemented with a fluid interface
*
* Note: This will break lots of stuff. Don't use it.
* Note: This could be done by altering Element.prototype but that would break even more stuff
*
* Usage example:
* document.body.appendChild(
* document
* .createElement('a')
matrix-off: about-scheme true
matrix-off: behind-the-scene true
matrix-off: chrome-extension-scheme true
matrix-off: chrome-scheme true
matrix-off: localhost true
matrix-off: opera-scheme true
* * cookie block
* * script block
* 1st-party * allow
* 1st-party script allow
@edwardgalligan
edwardgalligan / index.html
Created November 5, 2016 18:09
Chrome Service Worker Link Header
HTTP/1.1 200 OK
Content-Type: text/html
Content-Length: 0
Link: </serviceworker.js>;rel="serviceworker"
Refresh: 0
@edwardgalligan
edwardgalligan / map.html
Created November 21, 2016 22:31
Mapbox GL
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<title>Mapbox GL</title>
<link rel="stylesheet" href="https://api.tiles.mapbox.com/mapbox-gl-js/v0.28.0/mapbox-gl.css" />
<style>
body { margin:0; padding:0; }
#map { position:absolute; top:0; bottom:0; width:100%; }
@edwardgalligan
edwardgalligan / CustomProject.php
Last active November 30, 2016 13:51
Old dirty legacy fake namespacing for PHP Sami
<?php
use Sami\Project;
use Sami\Reflection\ClassReflection;
class CustomProject extends Project
{
protected function updateCache(ClassReflection $class)
{
$name = $class->getName();
@edwardgalligan
edwardgalligan / organicityeu-tag-domains.html
Created December 22, 2016 02:01
Organicity.eu TagDomains
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Data</title>
<style>
html, body, #app {
margin: 0 auto;
padding: 0;