Skip to content

Instantly share code, notes, and snippets.

@alexhayes
alexhayes / MapContextKeyToF20.plist
Last active August 26, 2021 22:39
~/Library/LaunchAgents/MapContextKeyToF20.plist
<?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">
<!--
This remaps the Context Key (between the right hand Alt and Control on a normal keyboard) to the F20 key.
See https://apple.stackexchange.com/a/398797/264061
Source is stored in https://gist.github.com/alexhayes/be6257459eb7a2dbc1e5b2baaebdac90
-->
<plist version="1.0">
Lab-1: Cluster Creation
---------------------------
1. MSK Workshop link = https://amazonmsk-labs.workshop.aws/en/clustercreation.html
2. Use the following cloudformation template, download it on your laptop
https://github.com/vikasbajaj/msk-kafka-workshop/blob/master/msk-infra-and-kafka-clients/MSK-VPC-Clients.yaml
3. Make sure you are in running this lab in ap-southeast-2 (sydney) region
@alexhayes
alexhayes / ssl_puma.sh
Last active November 1, 2018 03:19 — forked from tadast/ssl_puma.sh
localhost SSL with puma
# 1) Create your private key (any password will do, we remove it below)
$ cd ~/.ssh
$ mkdir local
$ openssl genrsa -des3 -out server.orig.key 2048
# 2) Remove the password
@alexhayes
alexhayes / .slate
Created January 22, 2018 01:27
My slate rc
# Move to
bind ;:cmd,alt,ctrl throw 0
bind .:cmd,alt,ctrl throw 1
# Resize on Top Screen
bind l:cmd,alt move screenOriginX,screenOriginY screenSizeX/2,screenSizeY 0
bind ;:cmd,alt move screenOriginX,screenOriginY screenSizeX,screenSizeY 0
bind ':cmd,alt move screenOriginX+screenSizeX/2,screenOriginY screenSizeX/2,screenSizeY 0
# Resize on Laptop Screen
@alexhayes
alexhayes / .direnvrc
Last active August 25, 2021 07:15
My custom .direnvrc
# See https://github.com/direnv/direnv/wiki/Python#-pyenv
use_flutter() {
PATH_add "$HOME/workspace/flutter/bin"
}
# Python using pyenv
#
# Usage:
# Install python with:
@alexhayes
alexhayes / pyenv+direnv on OSX.md
Last active November 6, 2022 20:17
Awesomely easy virtualenvs on OSX using pyenv and direnv

Awesomely easy virtualenvs on OSX using pyenv and direnv

Never forget to activate that virtualenv or set that environment variable ever again...

Install

  1. Install pyenv

     brew install pyenv
    
@alexhayes
alexhayes / keybase.md
Created August 31, 2016 22:00
keybase.md

Keybase proof

I hereby claim:

  • I am alexhayes on github.
  • I am alexhayes (https://keybase.io/alexhayes) on keybase.
  • I have a public key whose fingerprint is 39B2 DA8A 524D 2835 5D99 6460 217F 3346 CF5D B9E9

To claim this, I am signing this object:

@alexhayes
alexhayes / npm-standalone-eslint-install.sh
Last active July 12, 2016 03:05
Standalone `npm` install for eslint/react/et al
#!/bin/bash
npm install -g eslint babel-eslint eslint-config-standard-react eslint-config-standard eslint-plugin-promise eslint-plugin-standard eslint-config-standard eslint-plugin-flow-vars eslint-plugin-react
@alexhayes
alexhayes / dumpdata_by_id.py
Last active July 4, 2016 00:29
Django management command to dump out model instances and all nested associations
# -*- coding: utf-8 -*-
"""
Dump out objects and all nested associations.
"""
from __future__ import absolute_import, print_function, unicode_literals
import sys
from django.contrib.admin.utils import NestedObjects
from django.core import serializers
@alexhayes
alexhayes / dumpnested.py
Created May 2, 2016 08:37
Django management command to dump objects to JSON with all nested relations included.
# -*- coding: utf-8 -*-
"""
Dump out objects and all nested associations.
"""
from __future__ import absolute_import, print_function, unicode_literals
import sys
from django.contrib.admin.utils import NestedObjects
from django.core import serializers