View scripting-replies.ahk
; Scripting replies in Outlook 2016 with AutoHotkey
; Hit Ctrl + Win + r to create a reply email (template) with salutation to sender's
; First Name from selected / opened email in Microsoft Outlook, which looks like this:
;
; Hi <FirstName>,
;
; Thank you for your email.
;
; <Signature appears here, if set-up in Outlook>
;
View frontmatter.sh
#!/usr/bin/env bash
# Frontmatter -- 2017 ckunte
# Prepends `title =` to 1st line in all files
for f in *;
do sed '1i\
title = ' < $f > tmp_$f ;
mv tmp_$f $f ;
done
# Prepends `date =` to 2nd line in all files
for f in *;
View cf.sh
#!/usr/bin/env zsh
autoload -U zmv
# Safety first: Always use -n switch to test changes before commit.
# Clean up file names in subdirectories and remove special characters
zmv -n '(**/)(*)' '$1${2//[^A-Za-z0-9.-]/_}'
# Replace spaces in filenames and folders with a hyphen
zmv -n '* *' '$f:gs/ /-'
View mackeyboard.ahk
; Emulate macOS behaviour w/ a Mac keyboard on Windows
; 2017 ckunte
;
; credits to @mattheath and @stroebjo the very many shortcuts
;
; NOTES
;
; ! = ALT
; ^ = CTRL
; + = SHIFT
View rsync.md

rsync

From hard drive to external hard drive (d) for example

rsync -auv /cygdrive/c/apps/projects/ ~/d/projects

Such above commands (one per line) may be saved in a file, say, backup.sh under say ~/scripts folder), and run at prompt ($) as follows:

bash ~/scripts/backup.sh
View cygwin.md

Cygwin

I moved all my personal tools off the hard drive and on to an SD card recently, for portability. [Cygwin][c], among those, is like a pocket swiss army knife that allows me to use powerful GNU command line tools on Windows. (For tasks ranging from simple things like merging pdf files, search, slice and dice text from across multiple files, managing passwords, to writing and executing calculation scripts.) This is how I set it up:

  1. Run .\Downloads\setup-x86.exe --no-admin from Command Prompt.
  2. Select Install from Internet.
  3. Point the Root Directory to install: E:\cygwin, and choose Just Me.
  4. Point the Local Package Directory: E:\cache.
  5. Use Internet Explorer Proxy Settings.
  6. Select a mirror.
View rentreceipt.tex
%!TEX TS-program = xelatex
%!TEX encoding = UTF-8 Unicode
\documentclass[a5paper,11pt]{article}
\usepackage{geometry}
\usepackage{numname,sistyle}
\SIthousandsep{,}
%
% Start entering rental details below:
%
\newcommand{\mfr}{April 2016} % Month from
View sti.ics
BEGIN:VCALENDAR
PRODID:-//Hol2Ics//EN
BEGIN:VEVENT
SUMMARY:STI: Republic Day
DTSTART;VALUE=DATE:20170126
DTEND;VALUE=DATE:20170127
END:VEVENT
BEGIN:VEVENT
SUMMARY:STI: Ugadi
DTSTART;VALUE=DATE:20170329
View fltr.py
#!/usr/bin/env python
# encoding: utf-8
"""
fltr.py: Member end release conversion from STAAD to USFOS
2016 ckunte
"""
import re
# Use one file for START MY MZ and one file for END MY MZ
View enwind.py
#!/usr/bin/env python
# encoding: utf-8
"""Wind action plots based on EN 1991-1-4:2005.
2016 ckunte
Usage: enwind.py ( -i | -l | -p | -r ) [--height=H]
enwind.py --help
enwind.py --version