The lazy programmer scripts
scripts that work


Lazy see git merge history

When a git tree gets merge commits, the liniar history gets very hard to check, especially when you want to do a git bisect.

This git command will show you only the git merge commits from the base tree.

Written by kami on Wednesday December 12, 2018
Permalink - Tags: git, github

Lazy enable TLS 1.2 on Windows 7 / Windows 2008 R2

Websites like github.com and others require minimum TLS 1.2 version, which is not enabled by default on older or not updated versions of Windows, like Windows 7 or Windows 2008 R2.

This script should be run as Administrator and requires PowerShell v2 and has been tested on Windows 7 Pro and Windows 2008 R2.

Written by kami on Monday September 10, 2018
Permalink -

Lazy remove pesky files on Windows

There are some files on Windows which cannot be trivially removed, even if you are a full Administrator.

This PowerShell script makes sure that you remove them nonetheless.

Tested on Windows 10 x64.

Note: this script does not remove the files that are opened by a Windows process or if the file paths are more than 255 characters.

Written by kami on Thursday August 9, 2018
Permalink - Tags: powershell, windows, cmd




Lazy create sudo user

Creating users on Linux is trivial, but creating a user with sudo rights and no password confirmation when using sudo is not.

The script must be run under user root.

Tested on Ubuntu, Debian, CentOS and RHEL.

Written by kami on Friday December 8, 2017
Permalink - Tags: bash, linux, ubuntu, rhel, centos

Lazy show Windows volume information

If you need to retrieve verbose volume information, including the UNC/Win32 path, you can check out this repo https://github.com/ader1990/storage-info.

Statically compiled binaries for x86/x64 can be downloaded from the repo.

The x64 binary can be downloaded from https://github.com/ader1990/storage-info/blob/master/Binaries/storage-info.exe.

These binaries work on Windows and do not require any external dependency.

Tested on Windows 7 x86, Windows 10 x64 and Windows Server 2012 R2.

Written by kami on Friday September 1, 2017
Permalink - Tags: windows, binary, powershell, cmd, github, winapi

Lazy lsof for Windows

If you need the lsof functionality on a Windows system, you can check out this repo: https://github.com/cklutz/LockCheck

I have already built the project and you can download the `lsof.exe` binary from https://github.com/ader1990/LockCheck/blob/master/Binaries/lsof.exe.

This binary works on Windows and does not require any external dependency.

Tested on Windows 10 x64.

Written by kami on Friday September 1, 2017
Permalink - Tags: windows, linux, cmd, powershell, binary, visual-studio