Skip to content

Instantly share code, notes, and snippets.

@chorsnell
chorsnell / karabiner.json
Created January 19, 2024 10:28
PC Style Karabiner for Mac
{
"global": {
"ask_for_confirmation_before_quitting": true,
"check_for_updates_on_startup": true,
"show_in_menu_bar": true,
"show_profile_name_in_menu_bar": false,
"unsafe_ui": false
},
"profiles": [
{
@chorsnell
chorsnell / lrceth_prices.py
Last active December 23, 2021 20:40
Raspberry Pi Zero W + Waveshare 2.13 V2 e-ink HAT. Get LRC + ETH prices from Coingecko every minute
#!/usr/bin/python
# -*- coding:utf-8 -*-
import sys
import os
import operator
picdir = os.path.join(os.path.dirname(os.path.dirname(os.path.realpath(__file__))), 'pic')
libdir = os.path.join(os.path.dirname(os.path.dirname(os.path.realpath(__file__))), 'lib')
if os.path.exists(libdir):
sys.path.append(libdir)
@chorsnell
chorsnell / oktaLogin.js
Created December 3, 2020 19:25 — forked from ndavis/oktaLogin.js
Cypress Custom Command for Okta Login
Cypress.Commands.add('loginOkta', () => {
const optionsSessionToken = {
method: 'POST',
url: Cypress.env('session_token_url'),
body: {
username: Cypress.env('username'),
password: Cypress.env('password'),
options: {
warnBeforePasswordExpired: 'true'
}
@chorsnell
chorsnell / rw_ro_access.sql
Created November 16, 2020 16:54 — forked from checco/rw_ro_access.sql
How to create a read only user in AWS RDS PostgreSQL and a user with superuser privileges on AWS RDS PostgreSQL
--
-- Read only
--
-- Create a group
CREATE ROLE postgres_ro_group;
-- Grant access to existing tables
GRANT USAGE ON SCHEMA public TO postgres_ro_group;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO postgres_ro_group;

Stop docker

sudo service docker stop

Add docker config

Create /etc/docker/daemon.json

{ 
   "graph": "/path/to/your/docker" 
}
// Photoshop Script to Create iPhone Icons from iTunesArtwork
//
// WARNING!!! In the rare case that there are name collisions, this script will
// overwrite (delete perminently) files in the same folder in which the selected
// iTunesArtwork file is located. Therefore, to be safe, before running the
// script, it's best to make sure the selected iTuensArtwork file is the only
// file in its containing folder.
//
// Copyright (c) 2010 Matt Di Pasquale
// Added tweaks Copyright (c) 2012 by Josh Jones http://www.appsbynight.com