I also use
Karabiner and KMonad are great open source software. Don't forget to support the authors and contributors.
If you want to try home row mods
on OSX
, don't use Karabiner
but KMonad
.
KMonad
is harder at the beginning but then it is easier than Karabiner
.
Creating layers in KMonad
is trivial and without drawbacks, while it is impossible in Karabiner without drawbacks.
You need to compile a PR of the project. Install https://github.com/pqrs-org/Karabiner-DriverKit-VirtualHIDDevice/releases/download/v2.1.0/Karabiner-DriverKit-VirtualHIDDevice-2.1.0.pkg
{ | |
"title": "Vi Style Arrows", | |
"rules": [ | |
{ | |
"description": "Change command + h/j/k/l to Arrows", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "h", |
[ | |
{ | |
"Classification": "hive-site", | |
"Properties": { | |
"hive.users.in.admin.role": "amiorin,hive" | |
} | |
} | |
] |
#!/usr/bin/env bash | |
set -euo pipefail && cd "$(dirname "${BASH_SOURCE[0]}")/.." | |
# hit - git-like command dispatcher. Who needs Makefiles? | |
# | |
# Create a directory `bin/` at the top level of your project | |
# directory (the one committed to git). Copy this file into | |
# that folder, call it `hit` and make it executable. | |
# | |
# Type `bin/hit NAME` to run a subcommand called NAME. Subcommands |
⇐ back to the gist-blog at jrw.fi
Backing stuff up is a bit of a hassle, to set up and to maintain. While full-blown backup suites such as duplicity or CrashPlan will do all kinds of clever things for you (and I'd recommend either for more complex setups), sometimes you just want to put that daily database dump somewhere off-site and be done with it. This is what I've done, with an Amazon S3 bucket and curl
. Hold onto your hats, there's some Bucket Policy acrobatics ahead.
There's also a tl;dr at the very end if you just want the delicious copy-pasta.
import com.amazonaws.services.s3._, model._ | |
import com.amazonaws.auth.BasicAWSCredentials | |
val request = new ListObjectsRequest() | |
request.setBucketName(bucket) | |
request.setPrefix(prefix) | |
request.setMaxKeys(pageLength) | |
def s3 = new AmazonS3Client(new BasicAWSCredentials(key, secret)) | |
val objs = s3.listObjects(request) // Note that this method returns truncated data if longer than the "pageLength" above. You might need to deal with that. |
function regExpMatch(url, pattern) { | |
try { return new RegExp(pattern).test(url); } catch(ex) { return false; } | |
} | |
function FindProxyForURL(url, host) { | |
// Important: replace 172.31 below with the proper prefix for your VPC subnet | |
if (shExpMatch(url, "*172.31.*")) return "SOCKS5 localhost:8157"; | |
if (shExpMatch(url, "*saiki.zalan.do*")) return "SOCKS5 localhost:8157"; | |
if (shExpMatch(url, "*ec2*.amazonaws.com*")) return 'SOCKS5 localhost:8157'; | |
if (shExpMatch(url, "*.compute.internal*") || shExpMatch(url, "*://compute.internal*")) return 'SOCKS5 localhost:8157'; |
<?xml version="1.0"?> | |
<root> | |
<item> | |
<name>PageUp/PageDown to Right/Left</name> | |
<identifier>remap.pagetocursor</identifier> | |
<autogen>__KeyToKey__ KeyCode::PAGEUP, KeyCode::CURSOR_LEFT</autogen> | |
<autogen>__KeyToKey__ KeyCode::PAGEDOWN, KeyCode::CURSOR_RIGHT</autogen> | |
</item> | |
</root> |
/** | |
* Required Variables. | |
*/ | |
variable "name" {} | |
variable "port" {} | |
variable "elb_security_group" {} | |
variable "elb_subnets" {} |