Skip to content

Instantly share code, notes, and snippets.

View edwardgalligan's full-sized avatar

Ed Galligan edwardgalligan

View GitHub Profile
@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;
@edwardgalligan
edwardgalligan / tog.html
Last active February 10, 2017 01:31
tog ui/ux
<!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml" prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# article: http://ogp.me/ns/article#">
<!-- vim: et ts=4 sw=4 ff=unix ft=html: -->
<head profile="http://gmpg.org/xfn/11">
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
<title>Tóg Dublin Hackerspace, DIY, Projects, Electronics, Networking</title>
<link rel="stylesheet" href="/static/css/style.css" />
<link rel="apple-touch-icon" sizes="180x180" href="/static/icons/apple-touch-icon.png"/>
<link rel="icon" type="image/png" href="/static/icons/favicon-32x32.png" sizes="32x32"/>
<link rel="icon" type="image/png" href="/static/icons/favicon-194x194.png" sizes="194x194"/>
<?php
/**
* Quick utility function for dumping the public API of a class
*/
function reflect($obj) {
$refl = new \ReflectionClass($obj);
$ret = array();
foreach($refl->getConstants() as $const => $val) {
$ret[] = '::' . $const->name . ' = ' . $val;
}
@edwardgalligan
edwardgalligan / reactnativealike.css
Last active August 30, 2017 17:24
CSS Reset to make things behave kinda similar to ReactNative
html, body, body :not(script) {
display: flex;
flex-direction: column;
box-sizing: border-box;
margin: 0;
padding: 0;
}
html {
height: 100%;
}
<!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>TITLE</title>
<style>
html, body, body :not(script) {
display: flex;
flex-direction: column;
@edwardgalligan
edwardgalligan / prepare-for-github.sh
Created October 5, 2017 13:38
Changing author info without massacring upstream
#!/bin/sh
# vim: set et sw=4 ts=4 ff=unix ft=sh :
git filter-branch --env-filter '
OLD_EMAIL="private@email.com"
CORRECT_NAME="Your Name"
CORRECT_EMAIL="yourname@users.noreply.github.com"
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]
then
export GIT_COMMITTER_NAME="$CORRECT_NAME"
@edwardgalligan
edwardgalligan / adventofcode2017-day1.1.js
Last active December 1, 2017 15:38
Day 1: Inverse Captcha - Part One
// vim: set et sw=4 ts=4 ff=unix ft=javascript :
// @ts-check
/**
* Define
*/
const day1_1 = input => {
const digits = input.toString().split('');
let prev = parseInt(digits[digits.length-1]);
let sum = 0;
@edwardgalligan
edwardgalligan / adventofcode2017-day1.2.js
Last active December 1, 2017 15:38
Day 1: Inverse Captcha - Part Two
// vim: set et sw=4 ts=4 ff=unix ft=javascript :
// @ts-check
/**
* Define
*/
const day1_2 = input => {
const digits = input.toString().split('');
if (digits.length % 2 !== 0) {
@edwardgalligan
edwardgalligan / gather-facts.sh
Last active April 12, 2018 19:15
ansible gather facts
#!/usr/bin/env bash
# Usage: ./gather-facts.sh {{SERVER-IP}} {{SERVER-USERNAME}} > facts.json
# Or just copy paste from below...
SERVER_IP=$1
SSH_USERNAME=$2
printf "[hn]\n$SERVER_IP ansible_user=$SSH_USERNAME" > ansible_hosts_file.tmp && \
ansible -i ansible_hosts_file.tmp -m setup hn && \
rm ansible_hosts_file.tmp
@edwardgalligan
edwardgalligan / keybase.md
Created November 6, 2018 18:45
keybase.md

Keybase proof

I hereby claim:

  • I am edwardgalligan on github.
  • I am edgalligan (https://keybase.io/edgalligan) on keybase.
  • I have a public key ASCYM6oV7KfeXkumHKLLbWjjfHWcXbF2jAnxWH4RuNQuCAo

To claim this, I am signing this object: