Skip to content

Instantly share code, notes, and snippets.

View maxpatiiuk's full-sized avatar
🎆
Busy creating matrix

Max Patiiuk maxpatiiuk

🎆
Busy creating matrix
View GitHub Profile
@rharter
rharter / make_launcher.sh
Created September 23, 2020 16:08
Using this script you can create a tiny macOS app that will always launch the latest version of any JetBrains Toolbox installed IDE. Simply pass the target IDE application as the first argument and the script will create a launcher that you can add to your dock that will always point to the latest installed version of the IDE.
#!/bin/bash
APP_DIR=$1
APP_SCRIPT_NAME="$(ls "${APP_DIR}/Contents/MacOS/")"
APP_FILE_NAME="$(basename "${APP_DIR}")"
CHANNEL_DIR="$(dirname "$(dirname "$1")")"
CHANNEL_NAME="$(basename "$CHANNEL_DIR")"
TOOLBOX_APP_NAME="$(basename "$(dirname "$CHANNEL_DIR")")"
@styblope
styblope / docker-api-port.md
Last active July 14, 2024 08:29
Enable TCP port 2375 for external connection to Docker

Enable TCP port 2375 for external connection to Docker

See this issue.
Docker best practise to Control and configure Docker with systemd.

  1. Create daemon.json file in /etc/docker:

     {"hosts": ["tcp://0.0.0.0:2375", "unix:///var/run/docker.sock"]}
    
@emiller
emiller / git-mv-with-history
Last active April 17, 2024 21:06
git utility to move/rename file or folder and retain history with it.
#!/bin/bash
#
# git-mv-with-history -- move/rename file or folder, with history.
#
# Moving a file in git doesn't track history, so the purpose of this
# utility is best explained from the kernel wiki:
#
# Git has a rename command git mv, but that is just for convenience.
# The effect is indistinguishable from removing the file and adding another
# with different name and the same content.
@willurd
willurd / web-servers.md
Last active July 22, 2024 15:25
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000