Skip to content

Instantly share code, notes, and snippets.

Ben Creasy jcrben

View GitHub Profile
ilguzin / idea.vmoptions
Last active Aug 28, 2017
High performance Mac OS X IntelliJ IDEA options: /Applications/IntelliJ IDEA 12
View idea.vmoptions
dergachev /
Last active Jul 22, 2020
Caching debian package installation with docker

TLDR: I now add the following snippet to all my Dockerfiles:

# If host is running squid-deb-proxy on port 8000, populate /etc/apt/apt.conf.d/30proxy
# By default, squid-deb-proxy 403s unknown sources, so apt shouldn't proxy
RUN route -n | awk '/^ {print $2}' > /tmp/host_ip.txt
RUN echo "HEAD /" | nc `cat /tmp/host_ip.txt` 8000 | grep squid-deb-proxy \
  && (echo "Acquire::http::Proxy \"http://$(cat /tmp/host_ip.txt):8000\";" > /etc/apt/apt.conf.d/30proxy) \
  && (echo " DIRECT;" >> /etc/apt/apt.conf.d/30proxy) \
  || echo "No squid-deb-proxy detected on docker host"
vesse / login.jade
Last active Oct 21, 2019
View login.jade
doctype html5
title Test Page
.error #{message}
form(action='/login' method='POST')
label Email
input(type='email' name='email')
You can’t perform that action at this time.