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 / boxstarter.ps1
Last active May 26, 2019 19:28 — forked from jessfraz/boxstarter.ps1
Boxstarter Commands for a new Windows box.
# Description: Boxstarter Script Customizations
# Author: Jess Frazelle <jess@linux.com>
# Modified by Seth Bergman
# Last Updated: 2019-05-26
# https://gist.githubusercontent.com/sethbergman/65f4fd8172c9a0977ab24cbf98f3a13f/raw/6120d635c0f3a5cea5c659ddae44429a0ea4bd60/boxstarter.ps1
#
# Install boxstarter:
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
#
# You might need to set: Set-ExecutionPolicy RemoteSigned
@jordanorelli
jordanorelli / fuck_time_warner.md
Last active June 3, 2019 14:14
Fuck you, Time Warner Cable

I missed a payment on my Time Warner Cable bill. Prior to this, the hostname of my laptop was "yupa" (after Master Yupa, from Nausicaa of the Valley of the Wind, because it's a MBA, get it, air? ok, sorry, that's fucking awful I know). Anyway, look at what my hostname is now:

jordanorelli@auto-prov[0] ~: hostname
auto-prov.rr.com

umm, excuse me, I never changed my hostname. Anyway, let's back the fuck up and see how I even discovered this.

When I got home today, I opened my MBA and fired up Chrome. On startup, it tried to open up all the tabs that were open when I closed it. Some of these included a google.com page. All of them were, instead, redirected to whatever hostname they were talking to, with ap_index tacked on the end. E.g., refreshing a Google page bounced me to google.com/ap_index, which is the automatic provisioning page that a Time Warner Cable tech is supposed to see when they start up the computer. My brother (who is also my roommate) opened the account and has all the i

@thesandlord
thesandlord / Dockerfile
Last active April 17, 2021 23:18
ConfigMaps and Secrets with Kubernetes
# Copyright 2017, Google, Inc.
# Licensed under the Apache License, Version 2.0 (the "License")
FROM node:6-onbuild
EXPOSE 3000
ENV LANGUAGE English
ENV API_KEY 123-456-789
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
@mmrko
mmrko / docker-prune.sh
Last active September 3, 2021 08:42
Prune stale Docker containers, images & volumes (Bash) (versions < 1.13.0)
#!/usr/bin/env bash
stale_images=`docker images --no-trunc --quiet --filter "dangling=true"`
stale_containers=`docker ps --no-trunc --quiet --filter "status=exited"`
stale_volumes=`docker volume ls --quiet --filter "dangling=true"`
stale_images_count=`echo "$stale_images" | sed '/^\s*$/d' | wc -l | xargs`
stale_containers_count=`echo "$stale_containers" | sed '/^\s*$/d' | wc -l | xargs`
stale_volumes_count=`echo "$stale_volumes" | sed '/^\s*$/d' | wc -l | xargs`
echo "Removing stale containers..."
@ofstudio
ofstudio / heplers.js
Last active September 9, 2021 09:55
Couple useful heplers for ghost
var hbs = require('express-hbs'),
api = require('core/server/api'),
_ = require('lodash'),
async = require('express-hbs/lib/async'), // To redefine `registerAsyncHelper`
registerAsyncHelper;
// Redefine `registerAsyncHelper` from `express-hbs`
registerAsyncHelper = function (name, fn) {
hbs.handlebars.registerHelper(name, function (context, options) {
// Pass `[context, options]` as arg instead of `context` only
@mrexmelle
mrexmelle / create_docs.py
Created March 16, 2016 08:59
Python script to generate documentation using Grip
import getopt
import re, shutil, tempfile
import os
import subprocess
import sys
# http://stackoverflow.com/questions/4427542/how-to-do-sed-like-text-replace-with-python
def sed_inplace(filename, pattern, repl):
'''
@sethbergman
sethbergman / install-docker.sh
Last active December 27, 2021 16:38 — forked from dweldon/install-docker.sh
Install Docker CE on Linux Mint 19
#!/usr/bin/env bash
set -e
# https://docs.docker.com/engine/install/ubuntu/
sudo apt-get -y install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - 2>/dev/null
sudo echo "deb [arch=amd64] https://download.docker.com/linux/$(lsb_release -is | tr '[:upper:]' '[:lower:]') bionic stable" > /etc/apt/sources.list.d/docker.list
sudo apt-get -y update
@ktmud
ktmud / gulpfile.js
Last active February 28, 2022 10:39
An example gulpfile.js with bower components and live reload support
var BatchStream = require('batch-stream2')
var gulp = require('gulp')
var coffee = require('gulp-coffee')
var uglify = require('gulp-uglify')
var cssmin = require('gulp-minify-css')
var bower = require('gulp-bower-files')
var stylus = require('gulp-stylus')
var livereload = require('gulp-livereload')
var include = require('gulp-include')
var concat = require('gulp-concat')
@dweldon
dweldon / install-docker.sh
Last active April 8, 2022 11:18
Install docker CE on Linux Mint 18.3
#!/usr/bin/env bash
# https://docs.docker.com/install/linux/docker-ce/ubuntu/
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu xenial stable"
sudo apt-get update
sudo apt-get install docker-ce
# https://docs.docker.com/compose/install/