Skip to content

Instantly share code, notes, and snippets.

Avatar
🏢
New Office, still neck deep in code

Izaak "Zaak" Beekman zbeekman

🏢
New Office, still neck deep in code
View GitHub Profile
View gist:948481
#!/usr/bin/env python
import sys
import os
import string
MERGE = "emacs"
QFLAG = "-Q"
EVAL = "--eval"
EVALFUNC = ["ediff-merge-files-with-ancestor"]
View gist:948755
(ediff-merge-files-with-ancestor file-a file-b file-ancestor &optional
startup-hooks merge-buffer-file)
View my_dashboard.cmake
# Client maintainer: ibeekman@something.umd.edu
set(CTEST_SITE "rge.umiacs.umd.edu")
set(CTEST_BUILD_NAME "Linux64-Intel")
set(CTEST_BUILD_CONFIGURATION Debug)
set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
set(dashboard_model Nightly)
# dashboard_root_name = Change name of "My Tests" directory
# dashboard_source_name = Name of source directory (CMake)
# dashboard_binary_name = Name of binary directory (CMake-build)
View fixwhitespace.sh
#!/bin/bash
find . -type f -a \( -name '*.tex' -o -name '*.cmake' -o -name '*.bib' -o -name '*.md' -o -name '*.txt' \) -print -exec ~/clean-endings.sh {} ~/cleaning-log.txt \;
View clean-endings.sh
#!/bin/bash
((sed -i .back 's/ *$//' $1 && rm $1.back) || true) | tee -a $2
View fixup-eol-eof
#!/bin/bash
sed -e 's/[ ]*$//' -e :a -e '/^\n*$/{$d;N;ba' -e '}' $1
View a.rb
$ source .bash_profile
-bash: declare: -A: invalid option
declare: usage: declare [-afFirtx] [-p] [name[=value] ...]
-bash: complete: -D: invalid option
complete: usage: complete [-abcdefgjksuv] [-pr] [-o option] [-A action] [-G globpat] [-W wordlist] [-P prefix] [-S suffix] [-X filterpat] [-F function] [-C command] [name ...]
View .travis.yml
install:
- sudo apt-get install texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended
- sudo apt-get install chktex
script:
- make
- chktex -W # Print version information.
- chktex -q -n 6 *.tex chapters.*.tex 2>/dev/null | tee lint.out
# If lint output is non-empty report an error.
- test ! -s lint.out
View update_all_travis_ci_statuses
#!/bin/bash
# (Replace `$HOME/code` with the location of your projects)
for f in $(find /Users/ibeekman -name node_modules -prune -o -follow -maxdepth 3 -name .travis.yml -print 2>/dev/null); do
(builtin cd "$(dirname $f)" && /usr/local/bin/update_travis_ci_status)
done
View update_travis_ci_status
#!/usr/local/bin/bash
if [ -e ".travis.yml" ]; then
if type ruby > /dev/null 2>&1 && type travis > /dev/null 2>&1; then
stat_file=".travis_status~"
status=$(travis branches 2>&1)
echo "$status" > $stat_file
# Ignore status file from git repo
if ! ([ -e .git/info/exclude ] && grep -q "$stat_file" .git/info/exclude); then
[ -d .git/info ] && echo "$stat_file" >> .git/info/exclude
fi