Skip to content

Instantly share code, notes, and snippets.

The following command generates a 20 character password from all visible ASCII characters (94) except '"|\ (90), which are problematic in some contexts, like embedding in (unversioned) source code, for approximately [128 bits of entropy (9020 = 1.22e+39)][math]:

$ < /dev/urandom tr -dc [:graph:] | tr -d \|\\\'\\\\\" | head -c20 | xsel --clipboard 
@commonquail
commonquail / driver-irql-not-less-or-equal.md
Last active May 20, 2017 13:46
Troubleshooting DRIVER_IRQL_NOT_LESS_OR_EQUAL(L1C63x64.sys) on Windows 10

DRIVER_IRQL_NOT_LESS_OR_EQUAL is a famous Blue Screen of Death error, often caused by a bad driver somewhere. The Internet is awash with reports of variants of this error.

This particular variant, L1C63x64.sys, was an occasional occurrence for me on Windows 7, but seemingly only while torrenting.

Upgrading to Windows 10 turned the error from occasional to frequent within the first few days,

@commonquail
commonquail / mdpp.md
Last active August 28, 2015 04:38
Idea for a Markdown preprocessor

Idea for a Markdown preprocessor

Feature master list:

  • Table of contents
    • {{toc}}?
    • ATX headers
    • two-pass processing for consistent stream
    • Ignore # in code blocks, quotes
  • File transclusion
@commonquail
commonquail / find-skip-vcs-directories.md
Last active August 31, 2015 11:52
Skip VCS directories with find

This command recursively finds every file matching the glob pattern *.* (name.extension) in the working directory, excluding child directories whose names start with ..

This is useful for skipping various VCS directories, for instance.

find . -type d -path './.*' -prune -o -type f -name '*.*' -print
#!/bin/bash
set -o errexit
# Neovim
sudo add-apt-repository --yes ppa:neovim-ppa/unstable
# Git
sudo add-apt-repository --yes ppa:pdoes/ppa
sudo apt-get update
@commonquail
commonquail / tmux-24bit-ncursesw.sh
Last active May 8, 2022 01:00
Build tmux with 24bit color and ncursesw
#!/bin/bash
set -o errexit
ncursesw_dir=/usr/include/ncursesw
[[ -d "$ncursesw_dir" ]] ||
{
echo "fatal: ncursesw not found at ${ncursesw_dir}" >&2
exit 1
}
@commonquail
commonquail / open-msys2-shell-extension.md
Last active September 7, 2023 13:45
Open MSYS2 Bash in target directory

You can add Windows shell extensions for launching MSYS2 Bash sessions in a target directory.

For right-clicking the background of an open folder, use the command

C:\msys64\usr\bin\mintty --icon /msys2.ico /usr/bin/env CHERE_INVOKING=1 /usr/bin/bash --login

For right-clicking a folder, use the command

@commonquail
commonquail / ubuntu-with-cinnamon.md
Last active February 7, 2016 12:37
Ubuntu with Cinnamon

Installation

Disable the Unity overlay scrollbar, which causes rendering issues in Cinnamon:

gsettings set com.canonical.desktop.interface scrollbar-mode normal

Install Cinnamon from moorkaï's PPA:

@commonquail
commonquail / convert-doc-to-docx.md
Last active October 4, 2023 12:40
Recursively convert .doc to .docx

Microsoft Office 2007 and 2010 include a tool that can convert .doc-files to .docx-files from the command line.

This will not get rid of the compatibility-mode message -- that requires opening the file and saving it as a new format -- but it does help with reducing file sizes and cross-platform compatibilities.

The tool is called Wordconv.exe and is located in the root Office folder, e.g. Office14.