Skip to content

Instantly share code, notes, and snippets.

View softprops's full-sized avatar
®️
Rustling

Doug Tangren softprops

®️
Rustling
View GitHub Profile
# bintray hosted artifacts http://dl.bintray.com/softprops/maven/me/lessis/courier_2.11/0.1.3/
# request fails with a 500 error
curl -i -H "Content-Type:application/json" --user 'softprops:APIKEY' "https://api.bintray.com/maven_central_sync/softprops/maven/courier/versions/0.1.3" -d '{"username":"SONAUSER","password":"SONAPASS","close":"1"}'
@softprops
softprops / OpenJdk_Dockerfile
Last active August 29, 2015 14:03
java 6 Dockerfile
FROM dockerfile/ubuntu
# Install java 6
RUN apt-get update && \
apt-get install -y openjdk-6-jdk
CMD ["java"]
import unfiltered.jetty.Http
import unfiltered.filter.Planify
import unfiltered.request.{ Path, Seg }
import unfiltered.response.{ ContentType, HeaderName, ResponseBytes }
object ContentDisposition extends HeaderName("Content-Disposition")
val download = Planify {
case Path(Seg("download" :: Nil)) =>
// 1) set content type
alias docker-rm-untagged=docker images | grep "^<none>" | awk '{print $3}' | xargs docker rmi
# https://blog.codecentric.de/en/2014/07/enter-docker-container/
docker inspect --format "{{ .State.Pid }}" <container-id>
sudo nsenter --target <container-pid> --mount --uts --ipc --net --pid
\ SORRY /
\ /
\ /
] [ ,'|
] [ / |
]___ ___[ ,' |
] ]\ /[ [ |: |
] ] \ / [ [ |: |
] ] ] [ [ [ |: |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# comments
name.spacing = wow!
@softprops
softprops / DockerFile
Created January 31, 2015 15:55
rust starter
FROM dockerfile/ubuntu
ENV RUST_VERSION 2015-01-18
ENV RUST_GZ rust-nightly-x86_64-unknown-linux-gnu.tar.gz
ENV RUST_URL https://static.rust-lang.org/dist/$RUST_VERSION/$RUST_GZ
ENV RUST_DIR rust-nightly-x86_64-unknown-linux-gnu
RUN \
curl -SLO $RUST_URL \
@softprops
softprops / syslog_osx_netlistener.txt
Created February 20, 2015 04:26
how to enable syslog upd listener on osx
$ sudo plutil -convert xml1 /System/Library/LaunchDaemons/com.apple.syslogd.plist
$ sudo vi /System/Library/LaunchDaemons/com.apple.syslogd.plist
# add network listener http://stackoverflow.com/questions/1185554/how-to-enable-syslogd-to-receive-udp-logs-from-routers-in-osx
$ sudo plutil -convert binary1 /System/Library/LaunchDaemons/com.apple.syslogd.plist
$ sudo launchctl unload /System/Library/LaunchDaemons/com.apple.syslogd.plist
$ sudo launchctl load /System/Library/LaunchDaemons/com.apple.syslogd.plist