Skip to content

Instantly share code, notes, and snippets.

@schuyler1d
schuyler1d / userContent.css
Last active October 21, 2020 21:22
TestDome hiding candidate names/emails userContent.css file for Firefox
/*
Follow the instructions here to install:
https://davidwalsh.name/firefox-user-stylesheet
Then restart Firefox
*/
/*
Follow the instructions here to install:
https://davidwalsh.name/firefox-user-stylesheet
Then restart Firefox
@schuyler1d
schuyler1d / gist:0e5b01253692b3b10a9845a3e31870b9
Created May 10, 2017 21:00
delete files whose processes are not running but blocked by halockrun
crontab -l |egrep '^[0-9]+ [0-9]+' |egrep -o '\-n [a-z_/.]+ [a-z_/.]+' |while read -a line; do if [ -n "$(ps -ef|grep ${line[2]}|grep -v grep)" ] ;then echo "process ${line[2]} running"; else rm ${line[1]}; fi ;done
FROM ubuntu:14.04
#FROM centos:6
WORKDIR /devboot
#RUN yum install -y salt-minion
#ADD ./master.conf /etc/salt/minion.d/master.conf
#ADD ./master.conf /etc/salt/minion.d/master.conf
#salt ports
EXPOSE 4505
@schuyler1d
schuyler1d / gist:7610f95cc2b2a13f9029
Created August 18, 2015 18:05
keybase verification
### Keybase proof
I hereby claim:
* I am schuyler1d on github.
* I am schuyler1d (https://keybase.io/schuyler1d) on keybase.
* I have a public key whose fingerprint is F73C B9BB B9B7 FBEF B9DE EFB1 7481 5C93 57E2 FAC4
To claim this, I am signing this object:
@schuyler1d
schuyler1d / exercise_in_style.py
Created March 29, 2015 03:00
If you are not familiar with Queneau's unusual book Exercises in Style, then visit: http://www.amazon.com/Exercises-Oneworld-Classics-Raymond-Queneau/dp/1847490735#reader_1847490735 and read the first few pages. He tells the same brief story many times, all in different ways. This is an exercise in representing the same story, but in code.
"""
Notation, from _Exercises in Style_ by Raymond Queneau
-----------------------------------------------------------
On the S bus, in the rush hour, A chap of about twenty-six,
soft hat with a cord instead of a ribbon, neck too long,
as if someone's been tugging at it. People getting off.
The chap in question gets annoyed with one of the men
standing next to him. He accuses him of jostling him every
time anyone goes, past. A snivelling tone which is meant
to be aggressive. When he sees a vacant seat he throws
project = 'hi'
commit = None
with lcd("%s" % (project)):
commit = local("git log -g --pretty=%B -n 1")
print commit #This prints the right message
print commit # This doesn't
@schuyler1d
schuyler1d / gitbash.sh
Created December 21, 2011 15:32
Git status in bash prompt
function git_current {
git branch -v 2>/dev/null |grep '*'|awk '{print substr($2,0,6) " " substr($3,0,3)}'
}
RIGHT_PROMPT='\[\033[s\]\[\033[$((COLUMNS-16))C\]'
END_RIGHT_PROMPT='\[\033[u\]'
DEB_PREFIX='${debian_chroot:+($debian_chroot)}'
COL_FG='\[\033[00m\]'
USER_HOSTNAME_TRUNCATED='${USER:0:1}@${HOSTNAME:0:4}'
@schuyler1d
schuyler1d / gist:1027442
Created June 15, 2011 16:13
bashrc for git status prompt
function git_current {
BRANCH_NAME=`git branch -v 2>/dev/null |grep '^*'|awk '{print substr($2,0,6)}'`
BRANCH_HASH=`git branch --abbrev=4 -v 2>/dev/null |grep '^*'|grep -o ' [0-9a-f][0-9a-f][0-9a-f][0-9a-f] '`
echo -n $BRANCH_NAME $BRANCH_HASH
}
RIGHT_PROMPT='\[\033[s\]\[\033[$((COLUMNS-16))C\]'
END_RIGHT_PROMPT='\[\033[u\]'
DEB_PREFIX='${debian_chroot:+($debian_chroot)}'