Skip to content

Instantly share code, notes, and snippets.

Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
@commonquail
commonquail / .gitignore
Created January 12, 2019 18:13 — forked from stuart-marks/ReadFileJavaApplicationBufferedReader7.java
Processing Large Files in Java, Variation 7
*.class
indiv18.zip
itcont.txt
sample.txt
@commonquail
commonquail / README.md
Created October 14, 2017 07:17
Patch Git repo with diff between non-repo

Given two directories, one a Git repository and the other not, how do you apply the recursive diff between those two directories as a patch to the Git repository?

This might happen if you download source code without its history and make changes to it, then later acquire the history and wanting to secure your changes.

The easy way ...

@commonquail
commonquail / Makefile
Last active April 22, 2018 00:36
Evaluate, generate intermediate code, and compile to native Common Lisp with sbcl
src=foo.lisp
obj=$(src:.lisp=.fasl)
bin=foo
.SUFFIXES:
.PHONY: eval
eval:
sbcl --noinform --load $(basename $(src)) --eval '(main)' --eval '(exit)' \
2>/dev/null
Date Payee Category Memo Outflow Inflow
25/07/2010 Sample Payee Sample Category Sample Memo for an outflow 100.00
26/07/2010 Sample Payee 2 Sample Category Sample memo for an inflow 500.00
@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.

@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 / 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 / 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
}
#!/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