This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>com.user.keyremap</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>/usr/bin/hidutil</string> | |
<string>property</string> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local function pressFn(mods, key) | |
if key == nil then | |
key = mods | |
mods = {} | |
end | |
return function() hs.eventtap.keyStroke(mods, key, 10) end | |
end | |
local function remap(mods, key, pressFn) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
co = checkout | |
br = branch | |
pl = pull | |
ph = push | |
A = add -A | |
amend = commit --amend | |
ammend = commit --amend | |
rebase = rebase --no-ff | |
uncommit = reset HEAD~1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://bit.ly/3sZFmEN | |
let userInput = ` | |
SELECT "OrgUser"."id" AS "OrgUser_id", "OrgUser"."role" AS "OrgUser_role", "OrgUser"."user_id" AS "OrgUser_user_id", "OrgUser"."org_id" AS "OrgUser_org_id", "OrgUser"."created_at" AS "OrgUser_created_at", "OrgUser"."deleted_at" AS "OrgUser_deleted_at", "OrgUser"."updated_at" AS "OrgUser_updated_at" FROM "org_user" "OrgUser" WHERE "OrgUser"."user_id" = $1 AND "OrgUser"."deleted_at" IS NULL -- PARAMETERS: [7] | |
`; | |
let split = userInput.split('-- PARAMETERS: '); | |
var sql = split[0].trim(); | |
let params = JSON.parse(split[1]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting | |
autoload -Uz compinit && compinit | |
# https://superuser.com/a/1092328 | |
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' | |
## | |
## Git | |
## |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import os | |
import sys | |
from subprocess import call | |
if len(sys.argv) == 1: | |
print("Usage:\n ios-resize filename @3x_size_optional_param (32x32)") | |
sys.exit() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re, fileinput | |
print 'SET FOREIGN_KEY_CHECKS=0;' | |
def main(): | |
for line in fileinput.input(): | |
process = False | |
for nope in ('BEGIN TRANSACTION','COMMIT', | |
'sqlite_sequence','CREATE UNIQUE INDEX'): | |
if nope in line: break |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import urllib.request | |
import datetime | |
file_name = datetime.datetime.now().strftime("%Y-%m-%d %H.%M") + ".jpg" | |
urllib.request.urlretrieve("https://www.stevenspass.com/cams/cowboy/", "./cowboy/" + file_name) | |
urllib.request.urlretrieve("https://www.stevenspass.com/cams/base1/", "./base1/" + file_name) | |
urllib.request.urlretrieve("https://www.stevenspass.com/cams/jupiter/", "./jupiter/" + file_name) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) { | |
let window = UIApplication.shared.windows[0] | |
UIView.animate(withDuration: 0.25, animations: { | |
window.transform = CGAffineTransform(scaleX: 1.1, y: 1.1) | |
}, completion: { (completed) in | |
UIView.animate(withDuration: 0.25, animations: { | |
window.transform = CGAffineTransform(scaleX: 1.0, y: 1.0) | |
}, completion: { (completed) in | |
}) | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
co = checkout | |
c = commit | |
br = branch | |
aliases = !git config --list | grep ^alias\\. | cut -c 7- | grep -Ei --color \"$1\" "#" | |
appcode = "!git ls-files --modified | grep "\\.xcscheme$" | xargs git co" | |
pl = pull | |
ph = push | |
A = add -A | |
amend = commit --amend |
NewerOlder