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
@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
@sethbergman
sethbergman / webdev_online_resources.md
Created August 2, 2018 08:12 — forked from synch-cc/webdev_online_resources.md
Online Resources For Web Developers (No Downloading)
#!/bin/bash
# <UDF name="hostname" label="The hostname for the new Linode" example="apps">
# <UDF name="fqdn" label="The new Linode's Fully Qualified Domain Name" example="apps.example.com">
# <UDF name="adminuser" label="Username for new admin user (cannot be dokku)">
# <UDF name="adminpass" label="Password for new admin user">
# <UDF name="adminkey" label="SSH public key authorized for admin user (password SSH auth will be disabled)">
# <UDF name="dokkukey" label="SSH public key authorized for dokku user (used when deploying apps)">
# Turn off password authentication and root login for SSH
@sethbergman
sethbergman / create_docs.py
Created March 28, 2018 15:27 — forked from mrexmelle/create_docs.py
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 / heplers.js
Created March 5, 2018 22:08 — forked from ofstudio/heplers.js
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
@sethbergman
sethbergman / token-generator.js
Created October 26, 2017 11:29 — forked from ziluvatar/token-generator.js
Example of refreshing tokens with jwt
/**
* Example to refresh tokens using https://github.com/auth0/node-jsonwebtoken
* It was requested to be introduced at as part of the jsonwebtoken library,
* since we feel it does not add too much value but it will add code to mantain
* we won't include it.
*
* I create this gist just to help those who want to auto-refresh JWTs.
*/
const jwt = require('jwt');
@sethbergman
sethbergman / using-eslint-with-prettier.md
Created September 7, 2017 19:34 — forked from yangshun/using-eslint-with-prettier.md
Comparison between tools to allow you to use ESLint and Prettier together.
prettier-eslint eslint-plugin-prettier eslint-config-prettier
What it is A JavaScript module exporting a single function. An ESLint plugin. An ESLint configuration.
What it does Runs the code (string) through prettier then eslint --fix. The output is also a string. Plugins usually contain implementations for additional rules that ESLint will check for. This plugin uses Prettier under the hood and will raise ESLint errors when your code differs from Prettier's expected output. This config turns off formatting-related rules that might conflict with Prettier, allowing you to use Prettier with other ESLint configs like eslint-config-airbnb.
How to use it Either calling the function in your code or via [prettier-eslint-cli](https://github.co
@sethbergman
sethbergman / app.html
Created August 5, 2017 18:31 — forked from jdanyow/app.html
AST Visualizer
<template>
<require from="./expression"></require>
<button class="button-outline button-small"
repeat.for="example of examples"
click.delegate="expressionString = example.expression">
${example.name}
</button>
<label class="expression-input">
@sethbergman
sethbergman / app.html
Created August 5, 2017 18:31 — forked from jdanyow/app.html
AST Visualizer
<template>
<require from="./expression"></require>
<button class="button-outline button-small"
repeat.for="example of examples"
click.delegate="expressionString = example.expression">
${example.name}
</button>
<label class="expression-input">