Skip to content

Instantly share code, notes, and snippets.

View moorepants's full-sized avatar

Jason K. Moore moorepants

View GitHub Profile
# .bashrc
################################################################################
# python environment control
################################################################################
export PYTHON_ENV=""
function entervirtualenv
{
if type virtualenvwrapper.sh >/dev/null 2>&1; then
@ezietsman
ezietsman / build_deeming.sh
Last active August 26, 2020 20:42
Python, Cython, Fortran f2py and OpenCL versions of a Deeming periodogram
#!/bin/bash
f2py -c -m deeming periodogram.f90 -lgomp
f2py -c -m deemingomp periodogram.f90 --f90flags="-fopenmp " -lgomp
@TimBozeman
TimBozeman / superH
Created May 19, 2014 20:34
A script you can bind to a hotkey that toggles the Hamster Time Tracker window
#!/bin/bash
# @File Switch between current window and Hamster Time Tracker
# get current window
hamster="Time Tracker"
currentWindow=$(xprop -id $(xprop -root 32x '\t$0' _NET_ACTIVE_WINDOW | cut -f 2) _NET_WM_NAME|cut -d'"' -f2)
if [ "${currentWindow}" != "$hamster" ]
# write the title of the current window to a file and switch to hamster
then echo "${currentWindow}" > /tmp/hamster.dat && wmctrl -Fa "$hamster"
# read window temp file and switch to it