Skip to content

Instantly share code, notes, and snippets.

Brice Bentler Server4001

  • McGraw Hill Education
  • Seattle, WA
View GitHub Profile
View keybase.md

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 Aug 1, 2016
Node.js example Dockerfile
View Dockerfile
FROM node:4.4.7
MAINTAINER Brice Bentler <me@bricebentler.com>
WORKDIR /var/www/html
EXPOSE 3000
ENTRYPOINT ["npm", "start"]
View 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 Nov 24, 2015
tmux oh my zsh path fix
View .zshrc
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 Oct 28, 2015
PHP-FPM Dockerfile
View 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 Aug 29, 2015
jQuery deferred object example using AJAX
View deferredUsage.js
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
Homestead after provisioning script setting up Beanstalkd, Supervisord, Elasticsearch, & PHP Drivers for ImageMagick and Memcached
View after.sh
#!/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
You can’t perform that action at this time.