Instantly share code, notes, and snippets.

#!/usr/bin/env bash
curl -s | sed 's/^||//' > /etc/hosts
View pro_form.tex
\documentclass[a4paper,12pt]{article} % Page size
\usepackage[pdftex,bookmarks,colorlinks,pdfusetitle]{hyperref} % Document properties, etc.
\def\LayoutTextField#1#2{#2} % override default in hyperref
\def\lbl#1{\hbox to 5cm{#1\dotfill\strut}}%
#!/usr/bin/env python
# encoding: utf-8
""" -- 2018 ckunte
import numpy as np
import matplotlib.pyplot as plt
buoyancydata = np.loadtxt('buoyancy.csv', dtype='float,\
float,float,float',delimiter=',', usecols=(1,2,3,4),\
#!/usr/bin/env bash
# -*- coding: UTF-8 -*-
# compress all pdf files in a folder -- 2018 ckunte
for i in *.pdf; do gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/prepress -dNOPAUSE -dQUIET -dBATCH -sOutputFile=compr_$i $i; done
View w2p.bat
echo off
for %%X in (*.doc) do cscript.exe //nologo word2pdf.js "%%X"
  1. Search for edit env in the Start menu search to find Edit environment variables for your account. Click on it.

  2. Click New... in User variables.. and in the following menu, enter:

     Variable name : SHELL
     Variable value: /usr/bin/zsh

    Press OK, and OK.

  3. Close and restart Cygwin Terminal, and it should start with zsh.

#!/usr/bin/env python
# -*- coding: UTF-8 -*-
2014 ckunte
import os
import platform
platforms = os.walk('.').next()[1]
for platform in platforms:
View Makefile
# Makefile for backup and restore routines
# 2017 ckunte
# License: unlicense <>
#!/usr/bin/env zsh
git checkout --orphan newBranch
git add -A
git commit -m 'first commit'
# Deletes the master branch
git branch -D master
# Rename the current branch to master
git branch -m master
# Force push master branch to github
git push -f origin master
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>