Skip to content

Instantly share code, notes, and snippets.

@duebbert
duebbert / git.bat
Created Jul 12, 2017
git batch file for using with Bash on Ubuntu on Windows
View git.bat
@echo off
SETLOCAL enableextensions enabledelayedexpansion
:: Thanks:
:: - https://stackoverflow.com/questions/37000166/getting-pycharm-to-recognize-python-on-the-windows-linux-subsystem-bash-on-wind
:: ###################################################################################
:: Set up the current directory, so that we can change into it before calling git
:: ###################################################################################
@duebbert
duebbert / pycharm_babun.md
Last active Oct 11, 2017
Configuring PyCharm & Babun to work with SSH keys in Keepass using the KeeAgent Plugin
View pycharm_babun.md

Configuring PyCharm, Babun & WinSCP to work with SSH keys in Keepass using the KeeAgent Plugin

Description

This is a small guide on how to set up PyCharm, Babun & WinSCP on Windows to use SSH Keys which are saved in KeePass. This significantly improves the user experience while keeping the keys save.

Installation

@duebbert
duebbert / nginx.conf
Created Nov 16, 2015
NGINX config to first check a server, e.g. webpack-dev-server, if it's down then local files.
View nginx.conf
server {
[... normal configs]
# Try webpack server first, if error 502 then go try files
location ~ ^/.+/static/js/.+\.js$ {
proxy_pass http://127.0.0.1:8080;
proxy_set_header X-Forwarded-Host 127.0.0.1:8080;
error_page 502 = @localjs;
}
@duebbert
duebbert / ssh_ubuntu_windows.md
Last active Sep 3, 2019
Configuring PyCharm, Bash on Ubuntu on Windows 10 & WinSCP to work with SSH keys in Keepass using the KeeAgent Plugin
View ssh_ubuntu_windows.md

Configuring PyCharm, Bash on Ubuntu on Windows 10 & WinSCP to work with SSH keys in Keepass using the KeeAgent Plugin

Description

This is a small guide on how to set up PyCharm, Bash on Ubuntu on Windows & WinSCP on Windows to use SSH keys which are saved in KeePass. This significantly improves the user experience while keeping the keys save. It also alleviates any issues with Cygwin which prompted me to set this all up (see setup with Babun before https://gist.github.com/duebbert/1cd30115cf8ade37aa5b619080154e85)

Installation

@duebbert
duebbert / msysgit2unix-socket.py
Last active Apr 30, 2020 — forked from kevinvalk/msysgit2unix-socket.py
Updated to better survive crashes and other unexpected behavior.
View msysgit2unix-socket.py
#!/usr/bin/python3
"""
msysGit to Unix socket proxy
============================
This small script is intended to help use msysGit sockets with the new Windows Linux Subsystem (aka Bash for Windows).
It was specifically designed to pass SSH keys from the KeeAgent module of KeePass secret management application to the
ssh utility running in the WSL (it only works with Linux sockets). However, my guess is that it will have uses for other
@duebbert
duebbert / README.md
Created May 30, 2020
ultradefrag on Debian Testing (x64)
View README.md