This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; How to view scancodes in AHK v1 (I can't figure this out for v2) | |
; Right-click, "run this script" on this file (not the .exe) | |
; Right click and select "Open" | |
; View -> Key History and Script Info | |
; Now you can type things, press F5 to refresh; they appear bottom-up | |
SendMode("Input") ; Tutorials say this is good | |
Capslock::LCtrl ; Map Capslock to Control | |
RCtrl & Capslock::Capslock ; Map Right control + Capslock to Capslock | |
; Hibernate on ctrl+alt+win+h |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# usage: merge out.pdf file1.pdf file2.pdf ... | |
function merge() { | |
out="$1" | |
shift | |
gs -dNOPAUSE -sDEVICE=pdfwrite -sOUTPUTFILE="$out" -dBATCH $@ | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
FILE=conversation | |
LTIME=`stat -c %Z $FILE` | |
# Below is a Text width of 40 | |
echo "========================================" | |
while true | |
do | |
ATIME=`stat -c %Z $FILE` | |
if [[ "$ATIME" != "$LTIME" ]] | |
then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Create a 4x6 photo from one square image | |
if [ $# -ne 1 ]; then | |
echo "usage: ./passport.sh <filename>" | |
exit 1 | |
fi | |
FN="$1" | |
montage "$FN" -clone 0,0,0,0,0 -geometry +0+0 -tile 3x2 "${FN%.*}-4x6.jpeg" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\newcommand\negativebox[2]{% | |
\def\opc{0.75} | |
\def\opcol{white} | |
% Left | |
\fill[opacity=\opc, color=\opcol] | |
let | |
\p{sw} = (current bounding box.south west), | |
\p{nw} = (current bounding box.north west), | |
\p1 = (#1) | |
in (\p{sw}) rectangle (\x1, \y{nw});% |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Generates random roman names plus its gender | |
# Names copied from https://www.behindthename.com/names/usage/ancient-roman | |
# First preprocessed by | |
# awk 'FNR%2 {print $1 " " $2}' roman-names.txt > roman-names.csv | |
# Surnames copied from https://en.wikipedia.org/wiki/List_of_Roman_nomina | |
CNT=$1 | |
if [ "$#" -ne 1 ]; then | |
CNT=5 | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This file was initially generated by Windows Terminal 1.3.2651.0 | |
// It should still be usable in newer versions, but newer versions might have additional | |
// settings, help text, or changes that you will not see unless you clear this file | |
// and let us generate a new one for you. | |
// To view the default settings, hold "alt" while clicking on the "Settings" button. | |
// For documentation on these settings, see: https://aka.ms/terminal-documentation | |
{ | |
"$schema": "https://aka.ms/terminal-profiles-schema", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; How to view scancodes | |
; Right-click, "run this script" on this file (not the compiled file!) | |
; Right click and select "Open" | |
; View -> Key History and Script Info | |
; Now you can type things, press F5 to refresh; they appear bottom-up | |
#NoEnv ; Compatibility with future AutoHotkey releases | |
SendMode Input ; Tutorials say this is good | |
;Capslock::Esc ; Map Capslock to Escape | |
;+Capslock::Capslock ; Map Shift-Capslock to Capslock | |
Capslock::LCtrl ; Map Capslock to Control |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# usage: ital.sh <filename> | |
echo '/\\begin{document}/+,/\\end{document}/-s/\(.\)\(.\)/\\emph{\1}\2/g | w' | vim -e "$1" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# A xterm-256color based TERMINFO that adds the escape sequences for italic. | |
# Follow instructions at | |
# https://apple.stackexchange.com/questions/266333/how-to-show-italic-in-vim-in-iterm2 | |
# Basically, check italic text in settings, then type | |
# tic -o ~/.terminfo xterm-256color.terminfo.txt | |
# and make sure to export TERM=xterm-256color in your ~/.profile | |
xterm-256color|xterm with 256 colors and italic, | |
sitm=\E[3m, ritm=\E[23m, | |
use=xterm-256color, |
NewerOlder