Skip to content

Instantly share code, notes, and snippets.

@KonradAdamczyk
KonradAdamczyk / git.cmd
Last active May 22, 2020 07:15 — forked from jmickela/gist:7c383c78af66a37a2446fe7eb733b157
Trying to get PhpStorm to use git in Bash on Ubuntu on Windows (Windows Subsystem for Linux)
::There's a problem that you run into right away: you can't put a command line command, with arguments,
::into the path to git executable box.
::
::So putting something like bash.exe -c "git %*" isn't going to work. I wrote a small shell script that
::fixes this, for both 32-bit and 64-bit systems.
@echo off
::replace with absoulte WSL path to git.py
SET script_path="/mnt/c/Users/Konrad/bin/git.py"
If %PROCESSOR_ARCHITECTURE% == x86 (
@KonradAdamczyk
KonradAdamczyk / 99-opendns-update-ip.sh
Last active March 24, 2018 14:45
OpenWrt/LEDE openDNS dynamic ip updater, handles no Internet access state, and !yours openDNS IP conflict, and configures IP filtering as fast as possible, other methods implies few minutes without filtering after reconnecting
#!/bin/sh
# Place me in /etc/hotplug.d/iface/99-opendns-update-ip
#configuration start
user="mail@example.com" #email used while registering to opendns
password="pass" #password to opendns , as special chars use _ - (underscore or minus), other specials must be escaped
hostname="home" #label of opendns network
targetInterface="wan" #interface which has access to Internet, and dynamic ip
#configuration end
[ "$ACTION" = "ifup" ] && [ "$INTERFACE" = $targetInterface ] && {
logger -s -t opendnsIpChange "$targetInterface is up, updating ip"