Skip to content

Instantly share code, notes, and snippets.

@aarmea
aarmea / CapsCtrlEsc.ahk
Last active May 17, 2016 06:10
Caps Lock to Control and Escape
; Maps {Caps Lock}+key to {Ctrl}+key and {Caps Lock} by itself to {Esc}.
; Does nothing on Remote Desktop windows to prevent conflicts.
; Modified from http://www.autohotkey.com/board/topic/104173-capslock-to-control-and-escape/?p=669777
SetCapsLockState Off ; This doesn't work on mstsc, so we don't attempt to resend CapsLock manually
SetTitleMatchMode, 2 ; String passed to IfWinActive can be anywhere in the window title
SetTitleMatchMode, Fast
CapsLock::
@aarmea
aarmea / bash.bat
Last active August 29, 2015 14:06
Invoke msysGit Bash anywhere
@ECHO OFF
@ Creates a msysGit Bash instance in your Windows shell session while keeping its environment variables.
@ Requires msysGit (obviously), which can be installed either from their website or through choco.
@ Put this file somewhere in your %PATH%, like C:\Windows\System32 (if you put it there, you'll also want it in C:\Windows\SysWOW64).
"C:\Program Files (x86)\Git\bin\sh.exe" --login -i
@aarmea
aarmea / RPI_PPC_exec.sh
Last active December 14, 2015 05:38
An attempt at deriving the script used to invoke Assignment 3 for Carothers' course in Parallel Programming and Computing at RPI on the provided Blue Gene/Q system
#!/bin/bash
# you should define your own $name_of_executable
$coresPerNode = 16
for nodes in 4 8 16 32 64
do
for ranksPerCore in 1 2 4
do
srun -o output-$nodes-$ranksPerCore.txt --nodes=$nodes --ntasks=$((cores*ranksPerCore*coresPerNode)) --overcommit --runjob-opts="--mapping TEDCBA" ./$name_of_executable