Skip to content

Instantly share code, notes, and snippets.

View scottming's full-sized avatar
🎯
Focusing

Scott Ming scottming

🎯
Focusing
View GitHub Profile
@scottming
scottming / capslock.ahk
Last active January 11, 2023 17:19
; Autohotkey Capslock Remapping Script
; Autohotkey Capslock Remapping Script
; - Deactivates capslock for normal (accidental) use.
; - Hold Capslock and drag anywhere in a window to move it (not just the title bar).
; - Access the following functions when pressing Capslock:
;Cursor keys - h, j, k, l
;Home,End - N, ;
;Page up,down - - =
;Esc - CapsLock only
;CapsLock - Space
@scottming
scottming / init.lua
Last active October 26, 2016 13:57
local cmdalt = {"cmd", "alt"}
local capslock = {'cmd', "alt", "shift", "ctrl"}
-- Set grid size.
hs.grid.GRIDWIDTH = 4
hs.grid.GRIDHEIGHT = 6
hs.grid.MARGINX = 0
hs.grid.MARGINY = 0
hs.window.animationDuration = 0
# -*- coding: utf-8 -*-
import click
import os
import pandas as pd
def file_split(file):
s = file.split('.')
name = '.'.join(s[:-1]) # get directory name
@scottming
scottming / karabiner.json
Last active October 27, 2022 06:09
karabiner-elements
{
"global": {
"check_for_updates_on_startup": true,
"show_in_menu_bar": true,
"show_profile_name_in_menu_bar": false
},
"profiles": [
{
"complex_modifications": {
"parameters": {
@scottming
scottming / config.lua
Created August 15, 2018 03:27
my hammerspoon
-- private/config.lua
-- Specify Spoons which will be loaded
hspoon_list = {
-- "AClock",
-- "BingDaily",
-- "Calendar",
-- "CircleClock",
-- "ClipShow",
"CountDown",
-- "FnMate",
let g:NERDTreeNodeDelimiter = "\u00a0"
nnoremap \ ,
@scottming
scottming / tmux-cheatsheet.markdown
Created February 4, 2022 06:50 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@scottming
scottming / actionlist.vim
Created April 26, 2022 02:55 — forked from zchee/actionlist.vim
IdeaVim actionlist
--- Actions ---
$Copy <M-C>
$Cut <M-X> <S-Del>
$Delete <Del> <BS> <M-BS>
$LRU
$Paste <M-V>
$Redo <M-S-Z> <A-S-BS>
$SearchWeb <A-S-G>
$SelectAll <M-A>
$Undo <M-Z>

Last updated: 2017-03-18

Searching for Files

Find images in a directory that don't have a DateTimeOriginal

exiftool -filename -filemodifydate -createdate -r -if '(not $datetimeoriginal) and $filetype eq "JPEG"' .

###Output photos that don't have datetimeoriginal to a CSV### Note this can take a long time if you have a lot of jpgs

@scottming
scottming / linux-networking-tools.md
Created September 6, 2022 00:17 — forked from iscottming/linux-networking-tools.md
Linux networking tools

List of Linux networking tools

netstat (ss)

Displays contents of /proc/net files. It works with the Linux Network Subsystem, it will tell you what the status of ports are ie. open, closed, waiting, masquerade connections. It will also display various other things. It has many different options. Netstat (Network Statistic) command display connection info, routing table information etc. To displays routing table information use option as -r.

Sample output:

Proto Recv-Q Send-Q  Local Address          Foreign Address        (state)    
tcp4 0 0 127.0.0.1.62132 127.0.0.1.http ESTABLISHED