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 sh | |
selectOne() { | |
target=$(hyprctl clients -j | jq -rc '.[] | select((.class |test("'"${1}"'")))') | |
if [ -n "${target}" ]; then | |
target=$(echo "${target}" | jq -r '.address') | |
hyprctl dispatch "focuswindow address:${target}" >/dev/null | |
return 0 | |
fi | |
return 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
(add-hook 'eshell-mode-hook (lambda () | |
(add-hook 'eshell-pre-command-hook #'ig-eshell-pre-command nil t) | |
(add-hook 'eshell-post-command-hook #'ig-eshell-post-command nil t))) | |
(with-eval-after-load 'eshell | |
(defvar-local ig-eshell-last-command-status 0) | |
(defvar-local ig-eshell-last-command-start-time nil) | |
(defvar-local ig-eshell-last-command-time nil) | |
(defconst ig-color-blue "#3465A4" "Blue color.") | |
(defconst ig-color-bright-blue "#729FCF" "Bright blue color.") | |
(defconst ig-color-red "#CC0000" "Red color.") |
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
#compdef foo-tools.sh | |
_foo_tools_sh() { | |
local -a commands | |
commands=( | |
"start:Start something" | |
"stop:Stop something" | |
"install:Install something" | |
"switch:Switch to something 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
sudo yum install epel-release | |
sudo yum install gcc-c++ ncurses-devel ruby ruby-devel lua lua-devel luajit luajit-devel ctags python python-devel python3 python3-devel tcl-devel perl perl-devel perl-ExtUtils-ParseXS perl-ExtUtils-XSpp perl-ExtUtils-CBuilder perl-ExtUtils-Embed cscope gtk3-devel libSM-devel libXt-devel libXpm-devel libappstream-glib libacl-devel gpm-devel | |
yum list installed | grep -i vim | |
# sudo yum erase vim-common.x86_64 vim-enhanced.x86_64 vim-filesystem.x86_64 vim-X11 | |
# sudo depends on vim-minimal | |
sudo rpm -e --nodeps vim-minimal | |
sudo ln -s /usr/bin/python3.6 python3 |
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
SVN ignore: | |
svn propedit svn:ignore . | |
PostgreSQL: | |
Copy data from your CSV file to the table | |
COPY zip_codes FROM '/path/to/csv/ZIP_CODES.txt' WITH (FORMAT csv); | |
Save select to CSV | |
Copy (Select * From foo) To '/tmp/test.csv' With CSV DELIMITER ','; |
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
git config core.eol lf | |
git config core.autocrlf input | |
git rm -rf --cached . | |
git reset --hard HEAD |
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
<!-- START: XXX Do not remove the comment's START-END pair. Used by Gradle --> | |
... | |
<!-- END: XXX --> |
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
android { | |
applicationVariants.all { variant -> | |
if (variant.getBuildType().isMinifyEnabled()) { | |
variant.assemble.doLast{ | |
copy { | |
from variant.mappingFile | |
into "${rootDir}/mappings" | |
rename { String fileName -> | |
"mapping-${variant.name}.txt" | |
} |