Skip to content

Instantly share code, notes, and snippets.

View shaunchurch's full-sized avatar
🏛️
Building

Shaun Church shaunchurch

🏛️
Building
View GitHub Profile
{
"[typescript]" : {
"editor.defaultFormatter" : "esbenp.prettier-vscode"
},
"explorer.openEditors.visible" : 0,
"javascript.updateImportsOnFileMove.enabled" : "always",
"[typescriptreact]" : {
"editor.defaultFormatter" : "esbenp.prettier-vscode"
},
"editor.tabSize" : 2,
I "solved" this problem using https://github.com/jakehilborn/displayplacer. If I connect my hub and the monitors are incorrect, instead of having to rotate screens or reconnect cables, I can now run a script (via a hotkey) to resolve this.
First, make sure your monitors are in the correct configuration. Then install displayplacer and run it.
brew tap jakehilborn/jakehilborn && brew install displayplacer
displayplacer list
At the bottom of the output you'll see that it generates the command which will place your monitors back into the current configuration. Example:
displayplacer "id:C00DE6B5-2BF1-D707-8452-14BD6BFAAC84 res:1920x1080 hz:60 color_depth:8 scaling:off origin:(0,0) degree:0" "id:D0823E00-B252-0F5C-DE87-D142F95D0CB4 res:1680x1050 color_depth:8 scaling:on origin:(-1680,0) degree:0" "id:1A13BBCA-7176-912E-4048-7E7E22D786C2 res:1080x1920 hz:60 color_depth:8 scaling:off origin:(1920,-386) degree:90"
I then created a service/action and set a keyboard shortcut for this item. Now a quick keystroke will
@shaunchurch
shaunchurch / easing.css
Created June 23, 2020 15:04 — forked from bendc/easing.css
Easing CSS variables
:root {
--ease-in-quad: cubic-bezier(.55, .085, .68, .53);
--ease-in-cubic: cubic-bezier(.550, .055, .675, .19);
--ease-in-quart: cubic-bezier(.895, .03, .685, .22);
--ease-in-quint: cubic-bezier(.755, .05, .855, .06);
--ease-in-expo: cubic-bezier(.95, .05, .795, .035);
--ease-in-circ: cubic-bezier(.6, .04, .98, .335);
--ease-out-quad: cubic-bezier(.25, .46, .45, .94);
--ease-out-cubic: cubic-bezier(.215, .61, .355, 1);
find . -name "node_modules" -type d -exec rm -rf '{}' +
const AWS = require("aws-sdk");
const fs = require("fs");
const textract = new AWS.Textract({ region: "us-west-2" });
const file = fs.readFileSync("./pdf/example.png");
const params = {
Document: {
Bytes: Buffer.from(file)
},
FeatureTypes: ["TABLES", "FORMS"]
};
// connects to a Zeit Now deployment, retrieves a list of source code files
// downloads them and writes them and their directory structure to the local filesystem.
var fs = require("fs");
const axios = require("axios");
const ROOT = "./output";
const TOKEN = "XXX"; // Zeit API token created in zeit dashboard
const DEPLOYMENT = "XXX"; // deploment id, retrieved from `now inspect project-xa332f.now.sh`
@shaunchurch
shaunchurch / osx_install.sh
Created April 5, 2019 15:49 — forked from t-io/osx_install.sh
Install most of my Apps with homebrew & cask
#!/bin/sh
echo Install all AppStore Apps at first!
# no solution to automate AppStore installs
read -p "Press any key to continue... " -n1 -s
echo '\n'
echo Install and Set San Francisco as System Font
ruby -e "$(curl -fsSL https://raw.github.com/wellsriley/YosemiteSanFranciscoFont/master/install)"
echo Install Homebrew, Postgres, wget and cask
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
@shaunchurch
shaunchurch / ADB App Directory backup
Last active February 15, 2018 13:59
How to extract a backup archive from an Android app's private directory
The phone should be in USB debug (while booted) or recovery mode (maybe)
To extract a backup archive from the app directory:
$ adb backup -f ~/songwriters-data.ab -noapk com.shaunchurch.songwriter.app
To extract the backup archive on your local machine:
$ dd if=songwriters-data.ab bs=1 skip=24 | openssl zlib -d | tar -xvf -
OR if openssl has no zlib support, use python:
@shaunchurch
shaunchurch / elm-intro.elm
Created August 28, 2017 18:09
A single file implementing some of the elm introduction exercises
import Html exposing (Html, button, div, text, input)
import Html.Attributes exposing (..)
import Html.Events exposing (onClick, onInput, onSubmit)
main : Program Never Model Msg
main = Html.beginnerProgram { model = model, view = view, update = update }
-- app state model
type alias Model = {
counter : Int,

Keybase proof

I hereby claim:

  • I am shaunchurch on github.
  • I am shaunchurch (https://keybase.io/shaunchurch) on keybase.
  • I have a public key whose fingerprint is C190 0968 FA82 9C47 2E73 78C2 7958 00C7 F918 A6BA

To claim this, I am signing this object: