Skip to content

Instantly share code, notes, and snippets.

Ana Nelson ananelson

Block or report user

Report or block ananelson

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
@ananelson
ananelson / Dockerfile
Created Jun 28, 2014
Squid for Docker, if it's on host OS
View Dockerfile
ENV HOST_IP_FILE /tmp/host-ip.txt
RUN /sbin/ip route | awk '/default/ { print "http://"$3":8000" }' > $HOST_IP_FILE
RUN HOST_IP=`cat $HOST_IP_FILE` && curl -s $HOST_IP | grep squid && echo "Found active squid!" && echo "Acquire::http::Proxy \"$HOST_IP\";" > /etc/apt/apt.conf.d/30proxy || echo "no squid"
View keybase.md

Keybase proof

I hereby claim:

  • I am ananelson on github.
  • I am ananelson (https://keybase.io/ananelson) on keybase.
  • I have a public key whose fingerprint is 02BF EBA9 9B91 EF53 4D69 2004 2684 693F 6F78 3A29

To claim this, I am signing this object:

View linkchecker debug
DEBUG 2014-01-09 16:59:37,070 MainThread Python 2.7.5+ (default, Sep 19 2013, 13:48:49)
[GCC 4.8.1] on linux2
DEBUG 2014-01-09 16:59:37,070 MainThread reading configuration from ['/root/.linkchecker/linkcheckerrc']
WARNING 2014-01-09 16:59:37,072 MainThread Running as root user; dropping privileges by changing user to nobody.
DEBUG 2014-01-09 16:59:37,079 MainThread configuration: [('anchors', False),
('authentication', []),
('blacklist', {'filename': '~/.linkchecker/blacklist'}),
('checkcss', False),
('checkhtml', True),
('clamavconf', '/etc/clamav/clamd.conf'),
View Requirements
Versions:
args4j 2.0.21
http://maven.jenkins-ci.org/content/repositories/releases/args4j/args4j/2.0.21/args4j-2.0.21.jar
asm 4.2.0
http://download.forge.ow2.org/asm/asm-4.2-bin.zip
parboiled 1.1.6
http://repo1.maven.org/maven2/org/parboiled/parboiled-core/1.1.6/parboiled-core-1.1.6.jar
@ananelson
ananelson / gist:7763218
Last active Dec 30, 2015
example jenkins build script
View gist:7763218
export PIP_DOWNLOAD_CACHE=$JENKINS_HOME/.pipcache
PYENV_HOME=$WORKSPACE/.pyenv/
if [ ! -d $PYENV_HOME ]; then
virtualenv $PYENV_HOME
fi
. $PYENV_HOME/bin/activate
pip install --upgrade dexy
View pre-commit
#!/bin/sh
#
# The hook should exit with non-zero status after issuing an appropriate
# message if it wants to stop the commit.
if git diff --cached | grep "NOCOMMIT"
then
echo "NOCOMMIT found in code, cancelling commit."
exit 1
fi
View gist:7270810
#!/bin/sh
#
# The hook should exit with non-zero status after issuing an appropriate
# message if it wants to stop the commit.
if git diff --cached | grep "NOCOMMIT"
then
echo "NOCOMMIT found in code, cancelling commit."
exit 1
else
View contain-image.html
<html>
<head>
<style>
.flask {
width: 300px;
height: 400px;
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAARoAAAGACAIAAAD9LDrIAAAKO2lDQ1BpY20AAHjanVN3WJP3Fj7f92UPVkLY8LGXbIEAIiOsCMgQWaIQkgBhhBASQMWFiApWFBURnEhVxILVCkidiOKgKLhnQYqIWotVXDjuH9yntX167+3t+9f7vOec5/zOec8PgBESJpHmomoAOVKFPDrYH49PSMTJvYACFUjgBCAQ5svCZwXFAADwA3l4fnSwP/wBr28AAgBw1S4kEsfh/4O6UCZXACCRAOAiEucLAZBSAMguVMgUAMgYALBTs2QKAJQAAGx5fEIiAKoNAOz0ST4FANipk9wXANiiHKkIAI0BAJkoRyQCQLsAYFWBUiwCwMIAoKxAIi4EwK4BgFm2MkcCgL0FAHaOWJAPQGAAgJlCLMwAIDgCAEMeE80DIEwDoDDSv+CpX3CFuEgBAMDLlc2XS9IzFLiV0Bp38vDg4iHiwmyxQmEXKRBmCeQinJebIxNI5wNMzgwAABr50cH+OD+Q5+bk4eZm52zv9MWi/mvwbyI+IfHf/ryMAgQAEE7P79pf5eXWA3DHAbB1v2upWwDaVgBo3/ldM9sJoFoK0Hr5i3k4/EAenqFQyDwdHAoLC+0lYqG9MOOLPv8z4W/gi372/EAe/tt68ABxmkCZrcCjg/1xYW52rlKO58sEQjFu9+cj/seFf/2OKdHiNLFcLBWK8ViJuFAiTcd5uVKRRCHJleIS6X8y8R+W/QmTdw0ArIZPwE62B7XLbMB+7gECiw5Y0nYAQH7zLYwaC5EAEGc0Mnn3AACTv/mPQCsBAM2XpOMAALzoGFyolBdMxggAAESggSqwQQcMwRSswA6cwR28wBcCYQZEQAwkwDwQQgbkgBwKoRiWQRlUwDrYBL
View gist:6064339
# Sphinx version: 1.2b1
# Python version: 2.7.3
# Docutils version: 0.10 release
# Jinja2 version: 2.6
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/sphinx/cmdline.py", line 247, in main
app.build(force_all, filenames)
File "/usr/local/lib/python2.7/dist-packages/sphinx/application.py", line 211, in build
self.builder.build_update()
File "/usr/local/lib/python2.7/dist-packages/sphinx/builders/__init__.py", line 211, in build_update
View install-pjsip.sh
#!/bin/bash -v
export HOME=/root
### @export "capture-logs"
exec > >(tee /var/log/user-data.log|logger -t user-data -s 2>/dev/console) 2>&1
### @export "get-release-name"
source /etc/lsb-release
echo $DISTRIB_CODENAME
echo "deb http://us-east-1.ec2.archive.ubuntu.com/ubuntu $DISTRIB_CODENAME multiverse" >> /etc/apt/sources.list
You can’t perform that action at this time.