Skip to content

Instantly share code, notes, and snippets.

Mikkel Kjeldsen commonquail

Block or report user

Report or block commonquail

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View LICENSE.txt
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 Jan 12, 2019 — forked from stuart-marks/ReadFileJavaApplicationBufferedReader7.java
Processing Large Files in Java, Variation 7
View .gitignore
*.class
indiv18.zip
itcont.txt
sample.txt
@commonquail
commonquail / README.md
Created Oct 14, 2017
Patch Git repo with diff between non-repo
View README.md

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 Apr 22, 2018
Evaluate, generate intermediate code, and compile to native Common Lisp with sbcl
View Makefile
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
View bank-to-ynab.js
var save = function(transactions) {
const filename = "ynab.csv";
const blob = new Blob([transactions], {type: 'text/csv'});
if (window.navigator.msSaveOrOpenBlob) {
window.navigator.msSaveBlob(blob, filename);
} else {
const elem = document.createElement('a');
elem.href = window.URL.createObjectURL(blob);
elem.download = filename;
document.body.appendChild(elem);
@commonquail
commonquail / convert-doc-to-docx.md
Last active Feb 7, 2016
Recursively convert .doc to .docx
View convert-doc-to-docx.md

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.

View ubuntu-with-cinnamon.md

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 Mar 14, 2018
Open MSYS2 Bash in target directory
View open-msys2-shell-extension.md

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 Dec 29, 2015
Build tmux with 24bit color and ncursesw
View tmux-24bit-ncursesw.sh
#!/bin/bash
set -o errexit
ncursesw_dir=/usr/include/ncursesw
[[ -d "$ncursesw_dir" ]] ||
{
echo "fatal: ncursesw not found at ${ncursesw_dir}" >&2
exit 1
}
View ubuntu-setup.sh
#!/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
You can’t perform that action at this time.