Skip to content

Instantly share code, notes, and snippets.

View palaniraja's full-sized avatar

palaniraja palaniraja

View GitHub Profile
palaniraja / ublock - youtube.txt
Last active January 24, 2024 22:52
ublock origin - youtube cosmetics
View ublock - youtube.txt
# youtube cosmetics > > .yt-spec-icon-shape > div
palaniraja / typesim.lua
Created November 10, 2023 13:38
code snippet type simulator (clipboard) for hammerspoon
View typesim.lua
hs.hotkey.bind({"cmd", "shift", "ctrl"}, "v", function()
hs.hotkey.bind({"cmd", "shift", "ctrl"}, "s", function()
activeTimer = nil
palaniraja / righthalf.lua
Created October 10, 2023 19:03
hammerspoon right half on this monitor
View righthalf.lua
hs.hotkey.bind({"cmd", "shift", "ctrl"}, "space", function()
function rightHalf()
screen = hs.screen.mainScreen()
screenName = screen:name()
win = hs.window.focusedWindow()
app = win:application():name()
palaniraja / userChrome.css
Created June 22, 2023 16:39
Firefox multiline tab rows, and default window height
View userChrome.css
/* Source file made available under Mozilla Public License v. 2.0
See the above repository for updates as well as full license text. */
/* Makes tabs to appear on multiple lines */
/* Tab reordering will not work and can't be made to work */
/* You can use multi-row_tabs_window_control_patch.css to move window controls to nav-bar*/
/* You might want to move tabs-new-tab-button outside tabs toolbar for smoother behavior */
/* Change the --multirow-n-rows to change maximum number of rows before the rows will start to scroll */
palaniraja / kotlin-monaco-bookmarklet.js
Last active October 3, 2023 02:51
Kotlin language support for bitbucket
View kotlin-monaco-bookmarklet.js
palaniraja /
Last active March 21, 2023 17:05
customization on ~/.zshrc
ZSH_THEME="af-magic" # ref:
# plantuml local web for VSCode on port 8000
alias plantuml="cd ~/Desktop/Data/tools/plantuml && java -jar plantuml.jar -picoweb:8000"
# history
fh() {
print -z $( ([ -n "$ZSH_NAME" ] && fc -l 1 || history) | fzf +s --tac --height "40%" | sed -E 's/ *[0-9]*\*? *//' | sed -E 's/\\/\\\\/g')
palaniraja /
Last active June 11, 2023 19:27
custom prompt in af-magic zsh-theme - to show prompt in next line (so PWD can be above that) 'NEWLINE' in line #1 and #4 are the changes #12 to disable username@machine on right
# primary prompt: dashed separator, directory and vcs info
${FG[032]}%~\$(git_prompt_info)\$(hg_prompt_info) ${FG[105]}%(!.#.${NEWLINE}»)%{$reset_color%} "
PS2="%{$fg[red]%}\ %{$reset_color%}"
# right prompt: return code, virtualenv and context (user@host)
# added time stamp to right prompt [4:16:55]
RPS1="%D{%L:%M:%S} %(?..%{$fg[red]%}%? ↵%{$reset_color%})"
if (( $+functions[virtualenv_prompt_info] )); then
palaniraja / sort-by-date.js
Created February 3, 2023 21:08
IIS directory listing sort by date. assuming your IIS set to list these 3 column (date, DIR|Size, Link)
View sort-by-date.js
arr = Array.from(document.querySelector("pre").childNodes)
links = 0
dates = []
links = []
meta = []
dirOrSize = []
i = 0;
arr.forEach((el) => {
palaniraja / swift-frontend.txt
Created January 19, 2023 21:42
Swift frontend usage reference
View swift-frontend.txt
OVERVIEW: Swift frontend
USAGE: swift-frontend -frontend
Treat the (single) input as a swiftinterface and produce a module
-dump-ast Parse and type-check input file(s) and dump AST(s)
-dump-interface-hash Parse input file(s) and dump interface token hash(es)
-dump-parse Parse input file(s) and dump AST(s)
palaniraja / xcodebuild-help.txt
Created January 19, 2023 21:35
xcodebuild -help - From Xcode 14.2 Build version 14C18
View xcodebuild-help.txt
Usage: xcodebuild [-project <projectname>] [[-target <targetname>]...|-alltargets] [-configuration <configurationname>] [-arch <architecture>]... [-sdk [<sdkname>|<sdkpath>]] [-showBuildSettings [-json]] [<buildsetting>=<value>]... [<buildaction>]...
xcodebuild [-project <projectname>] -scheme <schemeName> [-destination <destinationspecifier>]... [-configuration <configurationname>] [-arch <architecture>]... [-sdk [<sdkname>|<sdkpath>]] [-showBuildSettings [-json]] [-showdestinations] [<buildsetting>=<value>]... [<buildaction>]...
xcodebuild -workspace <workspacename> -scheme <schemeName> [-destination <destinationspecifier>]... [-configuration <configurationname>] [-arch <architecture>]... [-sdk [<sdkname>|<sdkpath>]] [-showBuildSettings] [-showdestinations] [<buildsetting>=<value>]... [<buildaction>]...
xcodebuild -version [-sdk [<sdkfullpath>|<sdkname>] [-json] [<infoitem>] ]
xcodebuild -list [[-project <projectname>]|[-workspace <workspacename>]] [-json]
xcodebuild -show