Skip to content

Instantly share code, notes, and snippets.

View josephabrahams's full-sized avatar

Joseph Abrahams josephabrahams

View GitHub Profile
@josephabrahams
josephabrahams / .bashrc
Last active August 29, 2015 14:08
.bashrc for Ubuntu Server
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# don't put duplicate lines or lines starting with space in the history.
# See bash(1) for more options
HISTCONTROL=ignoreboth
@josephabrahams
josephabrahams / .profile
Last active August 29, 2015 14:08
Simple [ba]sh start-up file
# colorize the prompt
PS1="\u@\h:\[\e[1;34m\]\w\[\e[0m\]\\$ "
# colorize `ls`
if ls --color > /dev/null 2>&1; then
# GNU
alias ls='ls --color=auto'
else
# BSD
alias ls='ls -G'
@josephabrahams
josephabrahams / footer.html
Created October 24, 2014 16:59
Avoid `console` errors in browsers that lack a console.
@josephabrahams
josephabrahams / header.html
Last active August 29, 2015 14:08
Web Font Loader script
<!doctype html>
<html lang="en-US">
<head>
<title></title>
<meta charset="utf-8">
<script src="//ajax.googleapis.com/ajax/libs/webfont/1.5.3/webfont.js"></script>
<script>
WebFont.load({
custom: {
families: ['My Font']
@josephabrahams
josephabrahams / gulp-debug.js
Last active August 29, 2015 14:07
Debug gulp streams
var gulp = require('gulp'),
through = require('through2'),
util = require('gulp-util');
gulp.src('client/js/**/*.js')
.pipe(through.obj(function(file,enc,cb) {
util.log('cwd : '+file.cwd);
util.log('base: '+file.base);
util.log('path: '+file.path);
util.log('\n');
@josephabrahams
josephabrahams / .gitconfig
Last active January 19, 2021 15:44
Kaleidoscope Git Configuration
[diff]
tool = Kaleidoscope
[difftool]
prompt = false
[difftool "Kaleidoscope"]
cmd = ksdiff --partial-changeset --relative-path \"$MERGED\" -- \"$LOCAL\" \"$REMOTE\"
[merge]
tool = Kaleidoscope
keepBackup = false
[mergetool]
@josephabrahams
josephabrahams / config
Last active September 22, 2016 15:39
Make Boto use the AWS CLI config
[profile foo]
region=us-east-1
output=json
[profile bar]
region=us-east-1
output=json
; use if no profile specified
[default]
@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;
}
@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 / .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'