Skip to content

Instantly share code, notes, and snippets.

Avatar
🎮
2M > 5M > 3H > j.H > j.236L

Henré Botha henrebotha

🎮
2M > 5M > 3H > j.H > j.236L
View GitHub Profile
@henrebotha
henrebotha / dir-switch.zsh
Created Oct 7, 2020
Example script for switching working directory in shell & Vim using Tmux
View dir-switch.zsh
#! /usr/bin/env zsh
# Call this script as ./dir-switch.zsh /desired/directory
set -e
trap 'echo ERROR at $0 $LINENO; return' ERR
active_window=$(tmux list-windows | rg '\(active\)' | sed 's/:.\+//g')
panes=("${(@f)$(tmux list-panes -F '#{pane_index}')}")
active_pane=$(tmux list-panes -F '#{pane_active} #{pane_index}' | rg '^1' | sed 's/^1 //g')
@henrebotha
henrebotha / README.md
Last active Mar 8, 2022
How to set up a TypeORM playground
View README.md

How to set up a TypeORM playground

This guide is intended for people who'd like to experiment with TypeORM in a hands-on fashion. I find this especially helpful when attempting to construct complex queries.

Prerequisites

You need Yarn and Docker installed.

Process

@henrebotha
henrebotha / instructions.md
Last active Oct 4, 2022
Karabiner Elements: Caps Lock + I/J/K/L to Arrow Keys (a la Pok3r)
View instructions.md

Instructions

  1. Install Karabiner Elements
  2. Open your karabiner.json file (it will be in ~/.config/karabiner/karabiner.json).
  3. Find complex_modifications. It will have a key rules that takes a list ("rules": [...]).
  4. Inside the square brackets, paste this:
{
    "description": "Change Caps Lock + I/J/K/L to Arrow Keys",
View keybase.md

Keybase proof

I hereby claim:

  • I am henrebotha on github.
  • I am henrebotha (https://keybase.io/henrebotha) on keybase.
  • I have a public key ASBtSJbXiNfXbqei3-OxyWEGxupaV6xII3zohs5citb4Ago

To claim this, I am signing this object:

View mystyles.css
body, article, header
{
background-color:white;
/*background-image:url("FFTA2-Logo.jpg");*/
background-repeat:no-repeat;
background-attachment:fixed;
color:black;
font-family:Arial,Helvetica,sans-serif;
}
View builds.html
<!DOCTYPE html>
<html>
<head>
<title>Builds - FFTA2 Clan guide</title>
<link rel="stylesheet" type="text/css" href="mystyle.css">
</head>
<header><!--#include "/includes/navigation.ssi"--></header>
<body>
View Oceanic-Next-tweak.itermcolors
<!-- Oceanic Next, modified to remove alpha and color space references -->
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Blue Component</key>
<real>0.16862745583057404</real>
View gist:77cfe3596663a52d6147
# x does not exist yet
if false == true: # obviously this should never execute
x = 5
end
x
# x now exists. wtf
View gist:6a8927b5e02d2af99fef
➜ gramscout git:(staging) guard -P livereload
WARN: Unresolved specs during Gem::Specification.reset:
celluloid (>= 0.15.2)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
12:25:04 - INFO - Guard here! It looks like your project has a Gemfile, yet you are running
> [#] `guard` outside of Bundler. If this is your intent, feel free to ignore this
> [#] message. Otherwise, consider using `bundle exec guard` to ensure your
> [#] dependencies are loaded correctly.
> [#] (You can run `guard` with --no-bundler-warning to get rid of this message.)
View gist:61cd357a547aaa33a75c
➜ gramscout git:(staging) ✗ guard -P livereload
WARN: Unresolved specs during Gem::Specification.reset:
listen (~> 2.7)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
10:31:07 - INFO - Guard here! It looks like your project has a Gemfile, yet you are running
> [#] `guard` outside of Bundler. If this is your intent, feel free to ignore this
> [#] message. Otherwise, consider using `bundle exec guard` to ensure your
> [#] dependencies are loaded correctly.
> [#] (You can run `guard` with --no-bundler-warning to get rid of this message.)