defaults write com.apple.dock workspaces-swoosh-animation-off -bool YES && killall Dock
defaults write com.apple.CrashReporter DialogType none
{ | |
"name": "xxxxx", | |
"version": "1.0.0", | |
"license": "UNLICENSED", | |
"private": true, | |
"scripts": { | |
"format": "prettier --write .", | |
"prepare": "husky install", | |
"lint": "pnpm -r lint --fix", | |
"types:check": "pnpm -r types:check", |
defaults write com.apple.dock workspaces-swoosh-animation-off -bool YES && killall Dock
defaults write com.apple.CrashReporter DialogType none
#ifdef _WIN32 | |
// Use discrete GPU by default. | |
extern "C" { | |
// http://developer.download.nvidia.com/devzone/devcenter/gamegraphics/files/OptimusRenderingPolicies.pdf | |
__declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001; | |
| |
// http://developer.amd.com/community/blog/2015/10/02/amd-enduro-system-for-developers/ | |
__declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1; | |
} | |
#endif |
Here's how I put the FCC Universal Licensing System (ULS) data into a local database so I could find a vanity call sign.
l_amat.zip
(133 MB when I wrote this)HD.dat
is the file I wantHD
, and turned that table into the schema belowiconv -f latin1 -t utf-8 <HD.dat >HD.dat.utf8
psql -f schema.sql
to create the table and import the data#!/usr/bin/env bash | |
if [[ "$@" == *"camera -event on"* ]]; then | |
$HOME/bin/litra light | |
fi | |
if [[ "$@" == *"camera -event off"* ]]; then | |
$HOME/bin/litra dark | |
fi |
/* | |
* Usage: | |
* const { alert, confirm, prompt } = useModals() | |
* alert("Hey!") // awaitable too | |
* if (await confirm("Are you sure?")) ... | |
* const result = await prompt("Enter a URL", "http://") | |
*/ | |
import React, { | |
createContext, |
/* | |
Want to know when ECS events happen in Slack? Try this. | |
(1) Create a new Slack app with an incoming webhook, save the webhook URL | |
(2) Create an SNS topic called something like ECSEvents | |
(3) Create a CloudWatch Rule that publishes all ECS events to the topic | |
(4) Create a Node.js Lambda that is triggered by the SNS topic | |
(5) Add a WEBHOOK_URL environment variable to the Lambda with the webhook URL | |
(6) Paste this code into index.js | |
(7) Paste the contents of https://unpkg.com/node-fetch/lib/index.js into fetch.js | |
(8) Deploy and enjoy |
Why? I wanted an easy way to paste URLs that I use and share a lot.
How? It's just a domain plus a big list of urls (see links.conf
) which I edit with a script (see links.sh
)
Also: People kept asking for an index page, so I made one (https://github.com/statico/statico-link-list). I'll add social media previews when I can get it to work.
/** | |
* Why? | |
* | |
* Pressable is the newer and superior component in React Native for buttons. | |
* It has a built in affordance for near-misses and, most importantly, it | |
* doesn't respond or show an animation while the user is dragging. | |
* | |
* However, Pressable doesn't have any feedback, like TouchableOpacity. This | |
* simple component adds the animation you want *when* the user is actually | |
* committed a press. This is how, for example, the official Facebook app works. |