Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am fun4jimmy on github.
  • I am fun4jimmy (https://keybase.io/fun4jimmy) on keybase.
  • I have a public key whose fingerprint is 2C6A D735 4DE5 B551 2C83 F5F7 9932 2C3B D33D E0A7

To claim this, I am signing this object:

@fun4jimmy
fun4jimmy / find_cmake.bat
Last active December 4, 2020 12:50
A batch file used to locate the CMake executable, first checking the path then trying to find the installed location.
@echo off
setlocal
:: check for cmake on the path
SET CMAKE_EXE=cmake.exe
where /Q "%CMAKE_EXE%"
if errorlevel 1 (
call :find_installed_cmake
if errorlevel 1 (
@fun4jimmy
fun4jimmy / README.md
Last active May 27, 2017 12:59
Python module to transform path arguments to Windows binaries from WSL (Windows Subsystem for Linux) bash shells.

Synopsis

This python module forwards calls to Windows binaries from WSL (Windows Subsystem for Linux) bash shells also converting any path style arguments starting with /mnt/ to their Windows equivalent. Without this conversion the Windows binaries will attempt to open Linux file paths and fail.

Code Example

Invoking Sublime Text 3 from a WSL bash prompt:

$ wslexeshim.py "/mnt/c/Program Files/Sublime Text 3/subl.exe" -n -w /mnt/d/README.md
@fun4jimmy
fun4jimmy / .aliases
Last active September 13, 2016 09:33
.bashrc to configure a coloured bash prompt with current source control branch information if any.
# some aliases to mimic windows command prompt directory changes
alias c:="cd /mnt/c"
alias d:="cd /mnt/d"