Skip to content

Instantly share code, notes, and snippets.

View josephabrahams's full-sized avatar

Joseph Abrahams josephabrahams

View GitHub Profile
@josephabrahams
josephabrahams / 404.php
Last active December 30, 2015 04:39
404 all WordPress requests that don't match a theme template
<?php
$f_path = dirname( realpath( __FILE__ ) ) . '/../../../404.html';
if ( file_exists( $f_path ) ) {
readfile( $f_path );
} else {
echo '<h1>404 Not Found</h1>';
}
@josephabrahams
josephabrahams / Default (OSX).sublime-keymap
Last active August 29, 2015 13:57
Sublime Text 2 Keybindings
[
{ "keys": ["super+n"], "command": "new_window" },
{ "keys": ["super+t"], "command": "new_file" },
{ "keys": ["super+l,super+enter"], "command": "clone_file" },
{ "keys": ["ctrl+tab"], "command": "next_view" },
{ "keys": ["ctrl+shift+tab"], "command": "prev_view" }
]

Keybase proof

I hereby claim:

  • I am josephabrahams on github.
  • I am josephabrahams (https://keybase.io/josephabrahams) on keybase.
  • I have a public key whose fingerprint is EEA3 FAD3 05BB 0107 E8EC 217B 1DE9 F007 B39D 34B2

To claim this, I am signing this object:

@josephabrahams
josephabrahams / lfs-trusty-install.sh
Last active March 9, 2023 12:15
Linux From Scratch Ubuntu 14.04 Host System Requirements Install Script
#!/usr/bin/env bash
# Install missing Linux From Scratch Host System Requirements for Ubuntu 14.04
if [ ! $(whoami) == "root" ]; then
echo "Please run as root!"
exit 1
fi
# symlink sh to bash
ln -fsv /bin/bash /bin/sh
@josephabrahams
josephabrahams / lt-ie9.html
Last active August 29, 2015 14:06
IE8 & No-JS Modal
<!doctype html>
<html lang="en-US">
<head>
<title>LT IE9</title>
<meta charset="utf-8">
<style>
html, body {
height: 100%;
}
body {
@josephabrahams
josephabrahams / mavericks-iso.sh
Created September 13, 2014 22:20
Create a bootable ISO from the OS X Mavericks app
#!/bin/sh
# Create a bootable ISO from the OS X Mavericks app
# http://thezinx.com/misc/trend/create-bootable-dmg-iso-mavericks-app/
if [ ! -f /Applications/Install\ OS\ X\ Mavericks.app/Contents/SharedSupport/InstallESD.dmg ]; then
echo "Download the OS X Mavericks App and then rerun this script."
open "https://itunes.apple.com/us/app/os-x-mavericks/id675248567"
exit 1
fi
@josephabrahams
josephabrahams / socialSharePopups.js
Last active November 29, 2021 19:39
Facebook & Twitter Share Popup Windows
(function($) {
$('.js-share-twitter-link').click(function(e) {
e.preventDefault();
var href = $(this).attr('href');
window.open(href, "Twitter", "height=285,width=550,resizable=1");
});
$('.js-share-facebook-link').click(function(e) {
e.preventDefault();
var href = $(this).attr('href');
window.open(href, "Facebook", "height=269,width=550,resizable=1");
@josephabrahams
josephabrahams / .bash_profile
Last active August 29, 2015 14:06
Ubuntu Default LS Aliases for OS X (BSD)
alias ls='ls -G'
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
@josephabrahams
josephabrahams / redirect.html
Last active August 31, 2017 07:14
HTML Redirect with CSS Spinner
<!DOCTYPE html>
<html lang="en-US">
<head>
<title></title>
<meta charset="utf-8">
<meta http-equiv="refresh" content="1; URL=http://example.com">
<style>
html, body {
height: 100%;
}
@josephabrahams
josephabrahams / fade-in.css
Last active August 29, 2015 14:06
Web Font Loader fadeIn
.wf-loading { opacity: 0; }
.wf-active, .wf-inactive {
transition: opacity 800ms;
opacity: 1;
}