Skip to content

Instantly share code, notes, and snippets.

@cranst0n
cranst0n / Colemak Script
Created September 18, 2014 12:35
Script to setup Colemak keyboard and map caps lock to 'Backspace' key.
#!/bin/sh
setxkbmap us -variant colemak
xmodmap -e 'keycode 66 = BackSpace' -e 'clear Lock'
xset r 66
@cranst0n
cranst0n / SublimeUserPrefs
Last active October 5, 2018 20:16
My SublimeText prefs
{
"always_show_minimap_viewport": true,
"auto_complete": true,
"auto_match_enabled": true,
"bold_folder_labels": true,
"close_windows_when_empty": false,
"color_scheme": "Packages/Material Theme/schemes/Material-Theme-Palenight.tmTheme",
"detect_indentation": true,
"font_face": "Fira Code",
"font_options":
@cranst0n
cranst0n / dockerNS.bash
Created October 21, 2014 19:53
Bash alias for Docker 'nsenter' process
## Usage: dockerNS <name-of-Docker-container>
dockerNS() {
declare -r dockerName=$1
declare -r containerPID=`docker inspect --format "{{ .State.Pid }}" $dockerName`
sudo nsenter --target "$containerPID" --mount --uts --ipc --net --pid
}
alias dockerNS=dockerNS
{
"bootstrapped": true,
"in_process_packages":
[
],
"installed_packages":
[
"AdvancedNewFile",
"DocBlockr",
"GitGutter",
[{
"id": "view",
"children": [{
"id": "layout",
"children": [{
"command": "set_layout",
"caption" : "Custom: 3 Pane",
"mnemonic": "C",
"args": {
"cols": [0.0, 0.5, 1.0],
package freedom
import java.awt.{ Color, Graphics2D }
import java.awt.image.BufferedImage
import cats.data.Coproduct
import cats.free.{ Free, Inject }
import cats.{ ~>, Id }
@cranst0n
cranst0n / repositories
Created March 15, 2016 18:44
Sample repositories file to get SBT working with Artifactory
# Use '-Dsbt.override.build.repos=true' and '-Dsbt.repository.config=repositories' flags when firing up SBT
[repositories]
local
ivy-proxy: http://192.168.2.107:8081/artifactory/repo/, [organization]/[module]/[revision]/[type]s/[artifact](-[classifier]).[ext]
maven-proxy: http://192.168.2.107:8081/artifactory/repo/
sbt-plugins-proxy: http://192.168.2.107:8081/artifactory/repo/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
# Taken from 'http://stackoverflow.com/questions/750172/change-the-author-of-a-commit-in-git'
git filter-branch --commit-filter '
if [ "$GIT_COMMITTER_NAME" = "<Old Name>" ];
then
GIT_COMMITTER_NAME="<New Name>";
GIT_AUTHOR_NAME="<New Name>";
GIT_COMMITTER_EMAIL="<New Email>";
GIT_AUTHOR_EMAIL="<New Email>";
git commit-tree "$@";
else
@cranst0n
cranst0n / keybase.md
Created February 28, 2017 14:57
Keybase

Keybase proof

I hereby claim:

  • I am cranst0n on github.
  • I am cranston (https://keybase.io/cranston) on keybase.
  • I have a public key ASBmaO4BDTwDgCEWyqF2XHWg0VbivsjJSXfk6390CoUpawo

To claim this, I am signing this object:

// Installed Extensions:
// - Scala Syntax (Dalton Jorge)
// - Git History (Don Jayamanne)
// - File Utils (Steffen Leistner)
// - Material Theme (Mattia Astorino)
// - Subword Navigation (Steffen Leistner)
//////////////////// settings.json ////////////////////