Skip to content

Instantly share code, notes, and snippets.

View philcryer's full-sized avatar
💭
Mostly harmless

Phil Cryer philcryer

💭
Mostly harmless
View GitHub Profile
# Docker Upstart and SysVinit configuration file
# Customize location of Docker binary (especially for development testing).
#DOCKER="/usr/local/bin/docker"
# Use DOCKER_OPTS to modify the daemon startup options.
DOCKER_OPTS="-dns 8.8.8.8 -dns 8.8.4.4"
# If you need Docker to use an HTTP proxy, it can also be specified here.
#export http_proxy="http://127.0.0.1:3128/"
@philcryer
philcryer / gist:20a0def367408ac7ff95
Created May 30, 2014 19:58
Output for lsusb and lspci on an Apple Macbook Pro (2009, 5,5)
➜ ~ git:(master) ✗ lspci
00:00.0 Host bridge: NVIDIA Corporation MCP79 Host Bridge (rev b1)
00:00.1 RAM memory: NVIDIA Corporation MCP79 Memory Controller (rev b1)
00:03.0 ISA bridge: NVIDIA Corporation MCP79 LPC Bridge (rev b3)
00:03.1 RAM memory: NVIDIA Corporation MCP79 Memory Controller (rev b1)
00:03.2 SMBus: NVIDIA Corporation MCP79 SMBus (rev b1)
00:03.3 RAM memory: NVIDIA Corporation MCP79 Memory Controller (rev b1)
00:03.4 RAM memory: NVIDIA Corporation MCP79 Memory Controller (rev b1)
00:03.5 Co-processor: NVIDIA Corporation MCP79 Co-processor (rev b1)
00:04.0 USB controller: NVIDIA Corporation MCP79 OHCI USB 1.1 Controller (rev b1)
@philcryer
philcryer / gist:90e6ec16098549c9f910
Created June 5, 2014 14:56
Ideas for future server hardening script (witty name TBA)
1) read about some great chef recipes that auto hardened ssh and the OS for you...
https://github.com/TelekomLabs/chef-ssh-hardening
https://github.com/TelekomLabs?query=hardening
2) these were influenced by some of these links
https://wiki.archlinux.org/index.php/Sysctl
http://www.nsa.gov/ia/_files/os/redhat/rhel5-guide-i731.pdfhttps://github.com/TelekomLabs/chef-os-hardening
https://wiki.ubuntu.com/Security/Features
@philcryer
philcryer / gist:0c23003694ffeae7294d
Last active August 29, 2015 14:02
Vagrant - Docker - Shipyard experiments
# Vagrant, Docker and Shipyard
## Goals
Goals of this howto are getting docker setup, with shipyard managing it, all running on a local vagrant instance.
## Install Virtualbox
https://www.virtualbox.org/wiki/Downloads
@philcryer
philcryer / Vagrantfile
Last active August 29, 2015 14:05
Vagrantfile for CentOS 6.5
Vagrant.configure("2") do |config|
config.vm.box = "Centos 6.5"
config.vm.box_url = "http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_centos-6.5_chef-provisionerless.box"
config.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--memory", "1024", "--cpus", "1"]
vb.customize ["modifyvm", :id, "--cpuexecutioncap", "95"]
vb.gui = false
end
end
@philcryer
philcryer / gist:1be8a9f18af08f711e84
Last active August 29, 2015 14:07
shipyard getting a 404 when talking to docker-registry
0) startup a docker registry, in docker, listening on :5000
docker run \
-e SETTINGS_FLAVOR=dev \
-e STORAGE_PATH=/tmp/registry \
-e standalone=1 \
-e SEARCH_BACKEND=sqlalchemy \
-p 5000:5000 \
-v /tmp/registry:/tmp/registry \
registry
@philcryer
philcryer / fak3r.zsh-theme
Created November 5, 2014 15:28
My current zsh / oh-my-zsh theme
# fak3r-zsh.theme - MIT Lic 2014:w
# Some symbols you could use:
# ☀ ✹ ☄ ♆ ♀ ♁ ♐ ♇ ♈ ♉ ♚ ♛ ♜ ♝ ♞ ♟ ♠ ♣ ⚢ ⚲ ⚳ ⚴ ⚥ ⚤ ⚦ ⚒ ⚑ ⚐ ♺ ♻ ♼ ☰ ☱ ☲ ☳ ☴ ☵ ☶ ☷
# ✡ ✔ ✖ ✚ ✱ ✤ ✦ ❤ ➜ ➟ ➼ ✂ ✎ ✐ ⨀ ⨁ ⨂ ⨍ ⨎ ⨏ ⨷ ⩚ ⩛ ⩡ ⩱ ⩲ ⩵ ⩶ ⨠
# ⬅ ⬆ ⬇ ⬈ ⬉ ⬊ ⬋ ⬒ ⬓ ⬔ ⬕ ⬖ ⬗ ⬘ ⬙ ⬟ ⬤ 〒 ǀ ǁ ǂ ĭ Ť Ŧ
# define your box name at ~/.box_name if you want something special
function box_name {
[ -f ~/.box-name ] && cat ~/.box-name || hostname -s
@philcryer
philcryer / gist:05ef4bd58382f96f198b
Created December 12, 2014 18:36
nginx config for mailpile (running on 127.0.0.1:33411)
server {
listen 80;
server_name localhost;
location / {
rewrite /(.*) /$1 break;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;
proxy_pass http://127.0.0.1:33411;
### Keybase proof
I hereby claim:
* I am philcryer on github.
* I am fak3r (https://keybase.io/fak3r) on keybase.
* I have a public key whose fingerprint is A770 47C7 F6B6 2C9E B80F 326F 04A1 69CC A79F 7188
To claim this, I am signing this object:
@philcryer
philcryer / docker_on_wheezy.sh
Last active January 9, 2017 10:05
Install Docker on a fresh Docker Debian Wheezy image
#!/bin/bash
# Install Docker on Debian Wheezy
# gist:: https://gist.github.com/philcryer/29fa2cefa8cff736a624
# install a newer kernel, if we're running one later than version +3.2.x, from backports
if [[ `uname --kernel-release | cut -d"." -f2 | awk '{print substr($0,0,2)}'` -lt "2" ]]; then
echo "** Installing newer (3.2+) kernel from wheezy-backports..."
echo "deb http://http.debian.net/debian wheezy-backports main" >> /etc/apt/sources.list
apt-get update; apt-get install -t wheezy-backports linux-image-amd64 # reboot then run the script again...