Skip to content

Instantly share code, notes, and snippets.

@Majid03
Majid03 / windir.sh
Created September 18, 2017 01:15 — forked from Plazmaz/windir.sh
This is a simple function for converting windows paths (C:\Users\Test\t.txt) to their WSL equivalent (/mnt/c/Users/Test/t.txt)
# !/bin/bash
function windir() {
echo "/mnt/$1" | sed -e 's/\\\\/\//g' -e 's/\b\(.\):/\L\1/g'
}
@Majid03
Majid03 / EnableDisableHyperV.md
Created July 15, 2017 18:13 — forked from Ashwinning/EnableDisableHyperV.md
Powershell scripts to enable disable Hyper-V.

Open Powershell as admin

To Enable

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V –All

To Disable

Disable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-All
@Majid03
Majid03 / recover_source_code.md
Created March 12, 2017 17:00 — forked from simonw/recover_source_code.md
How to recover lost Python source code if it's still resident in-memory

How to recover lost Python source code if it's still resident in-memory

I screwed up using git ("git checkout --" on the wrong file) and managed to delete the code I had just written... but it was still running in a process in a docker container. Here's how I got it back, using https://pypi.python.org/pypi/pyrasite/ and https://pypi.python.org/pypi/uncompyle6

Attach a shell to the docker container

Install GDB (needed by pyrasite)

apt-get update && apt-get install gdb
@Majid03
Majid03 / 0-startup-overview.md
Created February 7, 2017 21:24 — forked from dideler/0-startup-overview.md
Startup Engineering notes
@Majid03
Majid03 / test file
Created May 14, 2014 20:42
this is a test
this is a test