Skip to content

Instantly share code, notes, and snippets.

View sethbergman's full-sized avatar
🐋
Building Docker Images for Dell Technologies

Seth Bergman sethbergman

🐋
Building Docker Images for Dell Technologies
View GitHub Profile
@sethbergman
sethbergman / Install-Docker-on-Linux-Mint.sh
Last active January 31, 2016 18:31
Install Docker on Linux Mint 17.3
# Check that HTTPS transport is available to APT
if [ ! -e /usr/lib/apt/methods/https ]; then
sudo apt-get update
sudo apt-get install -y apt-transport-https
fi
# Add the repository to your APT sources
sudo echo deb https://get.docker.com/ubuntu docker main > /etc/apt/sources.list.d/docker.list
# Then import the repository key
@sethbergman
sethbergman / Install-Docker-on-Linux-Mint.sh
Created November 21, 2015 18:00
Install Docker on Linux Mint 17.3
##########################################
# To run:
# curl -sSL https://gist.githubusercontent.com/sethbergman/955f6ad392fff733a62c/raw/41c229998634df722cefdd589da121af624bf2ce/Install-Docker-on-Linux-Mint.sh | bash -x
##########################################
# Check that HTTPS transport is available to APT
if [ ! -e /usr/lib/apt/methods/https ]; then
sudo apt-get update
sudo apt-get install -y apt-transport-https
fi
@sethbergman
sethbergman / rvm-cheat-sheet.md
Created January 1, 2016 02:27
RVM Cheat Sheet
@sethbergman
sethbergman / .drone.yml
Created January 5, 2016 03:55
Python + Drone + Docker publish
cache:
mount:
- wheeldir
build:
image: python:2.7.11
commands:
- pip wheel -r requirements.txt --wheel-dir=wheeldir --find-links=wheeldir
- pip install --use-wheel --no-index --find-links=wheeldir -r requirements.txt
- nosetests -v test/
@sethbergman
sethbergman / dokku_on_digital_ocean.md
Created January 10, 2016 23:12 — forked from henrik/dokku_on_digital_ocean.md
Notes from running Dokku on Digital Ocean.

My notes for Dokku on Digital Ocean.

Commands

Install dokku-cli (gem install dokku-cli) for a more Heroku-like CLI experience (dokku config:set FOO=bar).

# List/run commands when not on Dokku server (assuming a "henroku" ~/.ssh/config alias)
ssh henroku dokku
ssh henroku dokku config:get my-app
#! /bin/bash
# For use with Flink/dokku-psql-single-container.
# Based on http://donpottinger.net/blog/2014/11/25/postgres-backups-with-dokku.html
set -e
BASE_DIR="/var/backups/postgres"
mkdir -p $BASE_DIR
YMD=$(date "+%Y-%m-%d")
@sethbergman
sethbergman / heroku_logs.md
Created February 14, 2016 21:43
Connection error on starting heroku (Node.js/Express + MongoLab)
@sethbergman
sethbergman / dokku-node-mongo.md
Created February 16, 2016 01:37 — forked from fizerkhan/dokku-node-mongo.md
NodeJS and MongoDB app in Dokku with Digital Ocean

Steps:

  1. Create Digital Ocean Droplet with Dokku v0.3.16 on 14.04 image

  2. Login into the droplet and Update local settings.

    sh -c "echo 'LANG=en_US.UTF-8\nLC_ALL=en_US.UTF-8' > /etc/default/locale"
    reboot
@sethbergman
sethbergman / Find_and_Replace.js
Created February 20, 2016 07:25
Find and replace a text string with Regular Expressions in JavaScript
var regex = /Find this text string/,
replacement = 'Replace with this string';
function replaceText(i,el) {
if (el.nodeType === 3) {
if (regex.test(el.data)) {
el.data = el.data.replace(regex, replacement);
}
} else {
$(el).contents().each( replaceText );
}
@sethbergman
sethbergman / config-deploy.js
Created March 14, 2016 04:04
An opinionated collection of ember-cli-deploy plugins used to manage continuous deployment | https://github.com/zestyzesty/ember-cli-deploy-zesty-pack
/* jshint node: true */
'use strict';
function env(name) {
if (process.env[name]) {
return process.env[name];
} else {
throw new Error('Expected environment variable `' + name + '` to be set but it was not.');
}
}