- https://brew.sh
- Windows alternative - https://chocolatey.org
- for unlocking full feature set during trial: https://macbb.org
- feature rich "Spotlight"
- https://www.alfredapp.com/workflows/
#!/usr/bin/env node | |
const fs = require('fs') | |
const FILE = './bulk.csv'; | |
const data = fs.readFileSync(FILE, 'utf8'); | |
console.log('bytes', data.length) | |
const lines = data.split('\n'); | |
console.log('lines', lines.length); |
#!/usr/local/bin/bash | |
# Prerequisites: | |
# mkdir gcalcli-local && cd !$ | |
# pip3 install virtualenv | |
# virtualenv venv | |
# source venv/bin/activate | |
# pip3 install gcalcli | |
# which gcalcli # use this as command path in this script below | |
# deactivate |
# prerequisites: brew install fzf hub | |
function prss() { | |
hub issue --include-pulls --color \ | |
--since=`date -u -v-1m +"%Y-%m-%dT%H:%M:%SZ"` \ | |
--format="%Cyellow%i%Creset %t %Cwhite@%au%Creset %l %Cyellow%cr%Creset%n" | \ | |
fzf --ansi --preview="echo {} | cut -d' ' -f1 | tr -d '#' | xargs -I % hub issue show %" | \ | |
cut -d' ' -f1 | tr -d '#' | \ | |
xargs -I {} sh -c 'git rev-parse --verify pr-{} || git fetch origin pull/{}/head:pr-{} && git checkout pr-{}' | |
} |
tell application "System Events" to tell process "zoom.us" | |
tell window 1 | |
set buttonTitle to description of button 1 | |
# needs "Window > Always show meetings controls" enabled | |
if buttonTitle = "Unmute My Audio" then | |
click button 1 | |
"unmuted" | |
else if buttonTitle = "Mute My Audio" then | |
click button 1 | |
"muted" |
# Source: https://macscripter.net/viewtopic.php?pid=189593#p189593 | |
# example: inspecting the contents of the Notes window | |
tell application "System Events" to tell process "Notes" | |
class of UI elements | |
tell window 1 | |
class of UI elements | |
tell splitter group 1 | |
class of UI elements | |
# get name of button 1 | |
tell splitter group 1 |
function mrs() { | |
[ -z "$GITLAB_TOKEN" ] && \ | |
echo 'Missing GITLAB_TOKEN env var. See https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html#creating-a-personal-access-token' && \ | |
return 1 | |
# download from GL API, process with jq and colorize with sed replace | |
curl https://gitlab.com/api/v4/merge_requests?private_token=$GITLAB_TOKEN\&state=opened\&sort=desc\&scope=assigned_to_me 2>/dev/null | \ | |
jq --raw-output '.[] | "#" + (.iid | tostring) + " " + .title + " @" + .author.username + " | " + (.labels | join(", ")) + " \n 👉 " + .web_url + "\n"' | \ | |
sed "s,.*https.*,$(tput setaf 6)&$(tput sgr0)," | \ | |
sed -e "s/\(#[0-9]*\)\(.*\)\(@[a-zA-Z0-9-]*\) |\(.*\)/$(tput setaf 220)\1$(tput sgr0)\2$(tput setaf 7)\3 $(tput setab 4)\4$(tput sgr0)/g" |
function staging() { | |
echo -e "\e[2m\$ heroku $@ -a heroku-staging-app\e[0m" | |
heroku $@ -a heroku-staging-app | |
} | |
function prod() { | |
echo -e "\e[2m\$ heroku $@ -a heroku-production-app\e[0m" | |
heroku $@ -a heroku-production-app | |
} | |
alias prapps='heroku pipelines:info heroku-pipeline | grep review' | |
function prapp (){ |
{ | |
"BTTPresetName" : "Default", | |
"BTTPresetUUID" : "CB3027C7-7330-45F9-AFAC-448FAD8856AD", | |
"BTTPresetContent" : [ | |
{ | |
"BTTAppBundleIdentifier" : "com.apple.finder", | |
"BTTAppName" : "Finder", | |
"BTTTriggers" : [ | |
] |
Puma::Plugin.create do | |
def production? | |
ENV.fetch('RACK_ENV', 'development') == 'production' | |
end | |
def log(msg) | |
if production? | |
Rails.logger.info msg | |
else | |
puts msg |