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
// Place your key bindings in this file to override the defaultsauto[] | |
[ | |
{ | |
"key": "ctrl+left", | |
"command": "cursorWordPartLeft", | |
"when": "textInputFocus" | |
}, | |
{ | |
"key": "ctrl+shift+left", | |
"command": "cursorWordPartLeftSelect", |
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
function cleanUpGmail() { | |
var queries = [ | |
'from:(noreply@steampowered.com) in:inbox subject:(from your Steam wishlist on sale) older_than:7d', | |
'from:(no-reply@twitch.tv) in:inbox subject:(is live) older_than:1d', | |
'from:ebay.com subject:("is live!" OR "has been relisted") older_than:7d', | |
// Security alerts | |
'from:(no-reply@accounts.google.com) in:inbox subject:("Security alert" OR "New sign-in from") older_than:1m', | |
// 2FA | |
'from:(no-reply@email.gog.com) in:inbox older_than:1d subject:("two-step authentication" )' | |
] |
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
$videoFileBaseNames = ls *.mkv | % { $_.BaseName } # adjust file as necessary | |
foreach ($baseName in $videoFileBaseNames) | |
{ | |
$episode = $baseName.Split()[3] # adjust parsing of episode as necessary | |
$subfile = (ls *$episode*.srt)[0] | |
mv "$subfile" "$baseName.srt" | |
} |
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
lgtv --name MyTV --ssl startApp com.webos.app.homeconnect && sleep 4 && \ | |
lgtv --name MyTV --ssl sendButton up up right enter && sleep 2 && \ | |
lgtv --name MyTV --ssl sendButton enter && sleep 2 && \ | |
lgtv --name MyTV --ssl sendButton down down down left enter && sleep 2 && \ # number of `down`s here depends on the input ID; in this case I'm configuring HDMI 3 | |
lgtv --name MyTV --ssl sendButton down down down down down down down down down enter && sleep 2 && \ | |
lgtv --name MyTV --ssl sendButton up up up right enter && sleep 2 && \ # as noted above, number of `up`s here depends on input ID | |
lgtv --name MyTV --ssl sendButton 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
find . -type d -name $dir -prune -o -name '$file' -execdir pwd \; | |
# Example: find . -type d -name node_modules -prune -o -name 'package.json' -execdir npm install \; |
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 lgtv_path = "~/opt/lgtv/bin/lgtv" -- Full path to lgtv executable | |
local tv_name = "MyTV" -- Name of your TV, set when you run `lgtv auth` | |
local lgtv_cmd = lgtv_path.." --name "..tv_name | |
local my_input = "HDMI_3" | |
local other_input = "HDMI_4" | |
function get_command(command) | |
command = lgtv_cmd.. " " ..command.. " --ssl" | |
return command |
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
#Requires AutoHotkey v2.0 | |
#SingleInstance | |
#HotIf GetKeyState("CapsLock") | |
{ | |
1:: | |
{ | |
RunWait "lgtv --name MyTV --ssl setInput HDMI_3", , "Hide" | |
ToggleCapsLock() | |
} |
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
#Requires AutoHotkey v2.0 | |
#SingleInstance | |
Volume_Up:: | |
{ | |
audio_device := SoundGetName() | |
If InStr(audio_device, "LG TV SSCR2") | |
Run "lgtv --name MyTV --ssl volumeUp", , "Hide" | |
Else |
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
Get-NetFirewallRule | where { $_.Name -Like "*.exe" -and -not(Test-Path -Path $_.Name.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
# get processes by memory usage on busybox | |
ps | tail -n +2 | awk 'BEGIN {OFS="\t"}; { s = ""; for (i = 5; i <= NF; i++) s = s $i " "; print $3, s }' | sort -rnk 1 |
NewerOlder