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 / .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 / Procfile
Created March 15, 2016 02:59 — forked from jkresner/Procfile
Deploy brunch to heroku
web: ./node_modules/.bin/coffee app.coffee
@sethbergman
sethbergman / parser.js
Created March 25, 2016 23:38 — forked from ben-ng/parser.js
Heroku DB URL parser
function parse_url(str, component) {
// http://kevin.vanzonneveld.net
// + original by: Steven Levithan (http://blog.stevenlevithan.com)
// + reimplemented by: Brett Zamir (http://brett-zamir.me)
// + input by: Lorenzo Pisani
// + input by: Tony
// + improved by: Brett Zamir (http://brett-zamir.me)
// + improved by: Ben Ng (http://benng.me)
// % note: Based on http://stevenlevithan.com/demo/parseuri/js/assets/parseuri.js
// % note: blog post at http://blog.stevenlevithan.com/archives/parseuri
@sethbergman
sethbergman / Makefile
Created June 23, 2016 07:35 — forked from llj098/Makefile
a sample tcp server runs in kernel
obj-m += tcp_svr_sample.o
all:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
clean:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clea
@sethbergman
sethbergman / helium-desktop.sh
Created January 24, 2017 13:05 — forked from olesenm/helium-desktop.sh
helium shell script with normal system locations for 'adb'
#!/bin/sh
# start helium server on android device - see http://www.clockworkmod.com/carbon for more details
# set -x
# try normal system locations before the local binary
unset adb
for i in /usr/bin /usr/local/bin "$(/usr/bin/dirname $0)"
do
i="$i/adb"
if [ -f "$i" -a -x "$i" ]
@sethbergman
sethbergman / node-and-npm-in-30-seconds.sh
Created January 28, 2017 06:34 — forked from isaacs/node-and-npm-in-30-seconds.sh
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh