Skip to content

Instantly share code, notes, and snippets.

View WindomZ's full-sized avatar
💭
I may be slow to respond.

Windom.Z WindomZ

💭
I may be slow to respond.
View GitHub Profile
@WindomZ
WindomZ / switch_windows_with_scroll_wheel_on_ubuntu_dock.sh
Last active April 8, 2022 08:50
Switch windows with scroll wheel on Ubuntu Dock
gsettings set org.gnome.shell.extensions.dash-to-dock scroll-action 'cycle-windows'
@WindomZ
WindomZ / upgrade_filezilla3.sh
Last active May 28, 2019 08:33
Ubuntu upgrade FileZilla3
#!/usr/bin/env bash
cd FileZilla3 # enter FileZilla3 folder
sudo cp -arvx * /usr # replace with upgrade file
sudo chown root:root /usr/lib
@WindomZ
WindomZ / raspberry_golang_1.98
Created February 4, 2018 13:45
Install Golang 1.9.3 on Raspberry Pi 3
wget https://dl.google.com/go/go1.9.3.linux-armv6l.tar.gz
sudo tar -C /usr/local -xzf go1.9.3.linux-armv6l.tar.gz
export PATH=$PATH:/usr/local/go/bin
@WindomZ
WindomZ / golang-cross-compile
Created August 25, 2017 04:41
golang cross compile
# linux 64bit
$ GOOS=linux GOARCH=amd64 go build
# with the -o option to specify the name of the generated binary file
$ GOOS=linux GOARCH=amd64 go build -o app.linux
# linux 32bit
$ GOOS=linux GOARCH=386 go build
# windows 64bit
$ GOOS=windows GOARCH=amd64 go build
@WindomZ
WindomZ / apt-get proxy
Last active June 20, 2017 07:57
how to install packages with apt-get on a system connected via proxy
sudo vim /etc/apt/apt.conf
# The contents were:
Acquire::http::proxy "http://<proxy>:<port>/";
Acquire::ftp::proxy "ftp://<proxy>:<port>/";
Acquire::https::proxy "https://<proxy>:<port>/";
@WindomZ
WindomZ / .curlrc
Created June 18, 2017 12:57
curl command with socks5 proxy
socks5=127.0.0.1:1080
@WindomZ
WindomZ / Phpstorm-ExternalTool-php-cs-fixer
Created June 5, 2017 04:02
Phpstorm -> ExternalTool -> php-cs-fixer
name: php-cs-fixer
Open console: uncheck
Program: php-cs-fixer
Parameters: fix "$FileDir$/$FileName$" --rules=@PSR2
Working directory: $ProjectFileDir$
rm -rf "$(git rev-parse --git-dir)/refs/original/" && \
git filter-branch --env-filter \
"if [ \$GIT_COMMIT = \"$(git rev-parse HEAD)\" ]; then
export GIT_AUTHOR_DATE=\"$1\"
export GIT_COMMITTER_DATE=\"$1\"
export GIT_COMMITTER_NAME=\$GIT_AUTHOR_NAME
export GIT_COMMITTER_EMAIL=\$GIT_AUTHOR_EMAIL
fi"
@WindomZ
WindomZ / git-commit-modify-last-time_mac.sh
Last active April 19, 2017 09:08
Usage: ./git-commit-modify-last-time.sh <seconds(like: 86400 = 60 * 60 * 24 (s) = 24 (h)>
#!/usr/bin/env bash
git stash && \
date=$(date -r $(expr $(date '+%s') + $1) +%s) && \
rm -rf "$(git rev-parse --git-dir)/refs/original/" && \
git filter-branch --env-filter \
"if [ \$GIT_COMMIT = \"$(git rev-parse HEAD)\" ]; then
export GIT_AUTHOR_DATE=\"$date\"
export GIT_COMMITTER_DATE=\"$date\"
export GIT_COMMITTER_NAME=\$GIT_AUTHOR_NAME
export GIT_COMMITTER_EMAIL=\$GIT_AUTHOR_EMAIL
@WindomZ
WindomZ / .curlrc
Created February 24, 2017 02:11
curl proxy
socks5 = 127.0.0.1:1080