Skip to content

Instantly share code, notes, and snippets.

pestophagous pestophagous

Block or report user

Report or block pestophagous

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View add_n_diff
#!/bin/bash
if [ "${BASH_SOURCE[0]}" -ef "$0" ]
then
echo "Hey, you should source this script, not execute it!"
exit 1
fi
these=`git status --porcelain | grep '^UU' | awk '{print $2}'`
View 01-checklist.txt
git clone git@github.com:pestophagous/gists.git
git clone priv-dots.git
git clone git@github.com:pestophagous/emacs_d.git lisp
git clone git@gitlab.com:pestophagous/xkb-symbols.git # /usr/share/X11/xkb/symbols
git@gist.github.com:4324290ad58bbe7e249877ac4058924b.git # tweaks
View mybuild_qmlfmt.readme.txt
git clone https://github.com/jesperhh/qmlfmt.git
cd qmlfmt
git checkout 942200d
use to_apply_to_942200d.patch # so it will compile with qt 5.8.0
using "our customer's copy" of qt, which is qt 5.8.0
@pestophagous
pestophagous / disatos.sh
Created Oct 14, 2015
runs on mac. (uses launchctl). hide something, but set a task to auto-restore in 15 minutes. (for atos. could be made more general.)
View disatos.sh
#!/bin/bash
echo "about to run 'sudo launchtl list', so you might be prompted for sudoer password!"
CHECK_ATRUN=`(sudo launchctl list | grep atrun | wc -l)`
if [ "$CHECK_ATRUN" -ne "1" ]; then
echo ""
echo "Refusing to run the script."
echo ""
@pestophagous
pestophagous / go-in-emacs-cheatsheet.el
Last active Feb 21, 2019
scratch pad of various commands to recall
View go-in-emacs-cheatsheet.el
(setq mybuild-command "go build -v main.go && go test -v ./...")
(setq mybuild-command "go test -v github.com/practicum/sandbox/...")
(setq mybuild-command "go build -v github.com/practicum/sandbox/executables/cli/... && go test -v github.com/practicum/sandbox/...")
; run the go build from "high" in the folder tree, so you see longer paths in the compiler errors:
(setq mybuild-dir "/Users/someone/")
; available because of edits I made in go-mode.el (see bottom)
; M-x j (open go definition in this same window)
@pestophagous
pestophagous / rudimentary.js
Created Oct 4, 2015
guts of the rudimentary 'pager' (aka slideshow) type extension
View rudimentary.js
var somespecialthing = -1;
var superarraything = [
"2011-November/000089.html",
"2011-November/000090.html",
"2011-November/000091.html",
"2011-November/000092.html",
"2011-November/000093.html",
"2011-November/000094.html",
@pestophagous
pestophagous / profile.sh
Created Sep 14, 2015
put in bash .profile to see git branch name as part of PS1 prompt
View profile.sh
# write a function to compute the current git branch
parse_git_branch() {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
} # why is the ending with the > and the extra space not working??
# set the PS1 variable
PS1="$PS1\[\e[0;33;34m\]\$(parse_git_branch)\[\e[0;0m\]"
You can’t perform that action at this time.