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
System: Host: xunil Kernel: 4.10.0-20-generic x86_64 (64 bit gcc: 5.4.0)
Desktop: Cinnamon 3.2.7 (Gtk 2.24.30) dm: mdm Distro: Linux Mint 18.1 Serena
Machine: System: ASUSTeK (portable) product: K501UX v: 1.0
Mobo: ASUSTeK model: K501UX v: 1.0 Bios: American Megatrends v: K501UX.209 date: 01/20/2016
CPU: Dual core Intel Core i7-6500U (-HT-MCP-) cache: 4096 KB
flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 10368
clock speeds: min/max: 400/3100 MHz 1: 477 MHz 2: 487 MHz 3: 499 MHz 4: 490 MHz
Graphics: Card-1: Intel Sky Lake Integrated Graphics bus-ID: 00:02.0 chip-ID: 8086:1916
Card-2: NVIDIA GM107M [GeForce GTX 950M] bus-ID: 01:00.0 chip-ID: 10de:139a
Display Server: X.Org 1.18.4 driver: intel Resolution: [email protected], [email protected]
@sethbergman
sethbergman / automobile.ipynb
Created May 18, 2017 17:52 — forked from martinwicke/automobile.ipynb
Estimator demo using Automobile dataset
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
// server/app.js
const express = require('express');
const morgan = require('morgan');
const path = require('path');
const app = express();
// Setup logger
app.use(morgan(':remote-addr - :remote-user [:date[clf]] ":method :url HTTP/:http-version" :status :res[content-length] :response-time ms'));
@sethbergman
sethbergman / gulpfile.js
Created July 5, 2017 10:15 — forked from ktmud/gulpfile.js
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')
@sethbergman
sethbergman / app.html
Last active July 19, 2017 06:54 — forked from Vheissu/app.html
Checking for user provided slots
<template>
<require from="./modal"></require>
<modal>
<div slot="modalHeader">This is user provided header content.</div>
</modal>
</template>
@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">
@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 / 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 / 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