Skip to content

Instantly share code, notes, and snippets.

View Server4001's full-sized avatar

Brice Bentler Server4001

  • McGraw Hill Education
  • Seattle, WA
View GitHub Profile

Keybase proof

I hereby claim:

  • I am server4001 on github.
  • I am brice_bentler (https://keybase.io/brice_bentler) on keybase.
  • I have a public key ASBVtNEBJ5ocEnpeqiIs2deMRO-oD_6Tj9eNk6_gObh_KAo

To claim this, I am signing this object:

@Server4001
Server4001 / Dockerfile
Created August 1, 2016 05:23
Node.js example Dockerfile
FROM node:4.4.7
MAINTAINER Brice Bentler <me@bricebentler.com>
WORKDIR /var/www/html
EXPOSE 3000
ENTRYPOINT ["npm", "start"]
@Server4001
Server4001 / Dockerfile
Created August 1, 2016 05:20
Nginx Dockerfile
FROM phusion/baseimage:0.9.17
MAINTAINER Brice Bentler <me@bricebentler.com>
CMD ["/sbin/my_init"]
RUN apt-get update && apt-get install -y python-software-properties
RUN add-apt-repository ppa:nginx/stable
RUN apt-get update && apt-get install -y nginx
RUN echo "daemon off;" >> /etc/nginx/nginx.conf
@Server4001
Server4001 / .zshrc
Created November 24, 2015 03:27
tmux oh my zsh path fix
if [[ -z $TMUX ]]; then
# Fix issue where tmux creates duplicate path entries.
export PATH=$HOME/bin:$HOME/projects/terminal/shunit2-2.1.6/src:/opt/local/bin:/usr/local/gradle-2.4/bin:$HOME/Library/Android/sdk/tools:$HOME/Library/Android/sdk/platform-tools:$PATH
fi
@Server4001
Server4001 / Dockerfile
Last active October 28, 2015 03:50
PHP-FPM Dockerfile
FROM phusion/baseimage:0.9.17
MAINTAINER Brice Bentler <me@bricebentler.com>
CMD ["/sbin/my_init"]
RUN apt-get update && apt-get install -y python-software-properties
RUN locale-gen en_US.UTF-8 && export LANG=C.UTF-8 && add-apt-repository -y ppa:ondrej/php5-5.6
RUN apt-get update && apt-get install -y php5
RUN apt-get install -y php5-dev
RUN apt-get install -y php5-curl
@Server4001
Server4001 / deferredUsage.js
Last active August 29, 2015 14:24
jQuery deferred object example using AJAX
jQuery(document).ready(function($) {
$('#myButton').click(function(event) {
event.preventDefault();
var id = $('#someInput').val();
callEndpoint(id).done(function(data) {
// Do something with the response
}).fail(function(jqXHR, textStatus, errorThrown) {
// Show error message
});
@Server4001
Server4001 / after.sh
Last active May 30, 2016 01:00
Homestead after provisioning script setting up Beanstalkd, Supervisord, Elasticsearch, & PHP Drivers for ImageMagick and Memcached
#!/bin/sh
# Beanstalkd config
cat << EOF | sudo tee -a /etc/default/beanstalkd
BEANSTALKD_EXTRA="-b /var/lib/beanstalkd"
# Start at server boot:
START=yes
EOF
sudo service beanstalkd restart