Skip to content

Instantly share code, notes, and snippets.

View lbarratt's full-sized avatar
🖖

Luke Barratt lbarratt

🖖
View GitHub Profile
@Sythelux
Sythelux / base.skin
Created September 29, 2016 15:29
basic skin template for plantuml skins
skinparam Activity {
ArrowColor
ArrowFontColor
ArrowFontName
ArrowFontSize
ArrowFontStyle
BackgroundColor
BarColor
BorderColor
BorderThickness
The primary goal is to swap command and option.
The secondary goal is to remap Caps Lock to Control.
The tertiary goal is to share modifier keys across keyboards, so you can emacs with two keyboards.
The following instructions are good as of 2016-08-24, for OS X El Capitan 10.11.6.
Mac OS Sierra broke Seil support; Seil instructs us to consider Karabiner Elements.
But when Karabiner Elements swaps command and option, it does it for all keyboards;
meaning the native keyboard also gets its command and option swapped, which is bad!
@bmhatfield
bmhatfield / .profile
Last active May 6, 2024 22:27
Automatic Git commit signing with GPG on OSX
# In order for gpg to find gpg-agent, gpg-agent must be running, and there must be an env
# variable pointing GPG to the gpg-agent socket. This little script, which must be sourced
# in your shell's init script (ie, .bash_profile, .zshrc, whatever), will either start
# gpg-agent or set up the GPG_AGENT_INFO variable if it's already running.
# Add the following to your shell init to set up gpg-agent automatically for every shell
if [ -f ~/.gnupg/.gpg-agent-info ] && [ -n "$(pgrep gpg-agent)" ]; then
source ~/.gnupg/.gpg-agent-info
export GPG_AGENT_INFO
else
@joakimk
joakimk / README.md
Last active January 1, 2022 23:21
CircleCI elixir build example

This runs a build for a small elixir (phoenix) project in about 40 seconds by caching as much of the compiled files as possible.

We've been using this for months in multiple projects without any issues. Please ping be if there is any issues with this script and I'll update it.

It should be generic enough to work on any elixir app using mix.

If you have a elixir_buildpack.config, then enable that section in the build script to keep versions in sync!

2016-08-09: Updated to newer Erlang and Elixir and fixed curl command.

@balupton
balupton / README.md
Last active October 21, 2022 06:55
Boot Camp / Dual Boot on an iMac 27" Mid 2011

Dual Booting on an iMac 27" Mid 2011

UPDATE: See comment section below this post.

This guide is so complicated because the iMac's 27" Mid 2011 SuperDrive doesn't recognise the windows install disc. It's useless.

IMPORTANT: Unplug all external and physical hard drives (where possible) that you won't be installing to to avoid accidentally erasing them. Also make note of which drives and partitions remain (e.g. System and Storage hard drives), and be super careful to not erase the wrong one.

RECOVERY: If you nuke your machine, restore your time machine backup. Instructions here.

@pwenzel
pwenzel / Makefile
Last active October 12, 2021 13:29
Wordpress Makefile Workflow
.PHONY: install
install: clean wordpress phpunit wp-cli
git submodule init;
@echo "\n\nNOTICE: You may need to configure a MySQL database for your Wordpress installation. Just run:"
@echo " mysql -u root -p;"
@echo " CREATE DATABASE example_site; \n"
wordpress: latest.tar.gz
tar -zxvf latest.tar.gz;
@statique
statique / serialized_conversion.sql
Created November 2, 2012 20:42
PostgreSQL Convert Rails serialized YAML to JSON query
-- replace table_name with the name of your database table, e.g. users
-- replace data with the serialized field in the table, e.g. nicknames
-- output generates serialized data that decrypts to a Ruby array.
-- data with quotes, hyphens, or spaces will have issues with this query.
-- preview the YAML to JSON to confirm the conversion is working.
SELECT data, REPLACE(REPLACE(REPLACE(REPLACE(REGEXP_REPLACE(REPLACE(REPLACE(REPLACE(data,
' ', ''),
'...', ''),
'---', '["'),
@dimaulupov
dimaulupov / install-cloud9.sh
Created July 10, 2012 05:29
Ruby 1.9.3 installer for Cloud9 workspaces
#!/bin/bash
# This script downloads and installs Ruby 1.9.3-p194 into Cloud9 workspace.
# It makes possible to use Ruby 1.9 for running apps there instead of default Ruby 1.8.7
# Create this file in a root of your workspace.
# Run in command line: chmod +x install-cloud9.sh
# And: ./install-cloud9.sh
# It will take some time to download and compile libyaml and ruby.
# Adjust ruby version paths according to your needs.