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 / index.html
Created June 20, 2017 01:50
Material Design Bubble Animation
<body>
<div class="background"></div>
<div>
<div class="button"></div>
<div class="button"></div>
<div class="button"></div>
<div class="button"></div>
</div>
</body>
@sethbergman
sethbergman / config.js
Last active June 17, 2017 19:39
ServiceWorkerDemo
const isDev = /^http:\/\/localhost/.test(location.origin);
export const workerOrigin = isDev ? 'http://localhost:3000' : // your-url;
export const workerPage = workerOrigin + '/';
@sethbergman
sethbergman / background.js
Created June 17, 2017 19:07
Service Worker Demo2
addEventListener('backgroundfetched', event => {
event.waitUntil(async function() {
const cache = await caches.open('my-cache');
const promises = event.fetches.map(({request, response}) => {
if (response && response.ok) {
return cache.put(request, response);
}
});
await Promise.all(promises);
@sethbergman
sethbergman / index.html
Last active February 16, 2018 01:29
Service Worker Demo
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>GistRun</title>
</head>
<body>
<h1>Hello world!</h1>
<script src="main.js"></script>
<!--<script src="worker.js"></script>-->
@sethbergman
sethbergman / grid.html
Created June 12, 2017 08:40
Responsive grid using SASS
<div class="container">
<div class="container__row">
<div class="container__col-sm-12 container__col-md-4 container__col-lg-12">12lg, 4md, 12sm</div>
<div class="container__col-sm-12 container__col-md-4 container__col-lg-12">12lg, 4md, 12sm</div>
<div class="container__col-sm-12 container__col-md-4 container__col-lg-12">12lg, 4md, 12sm</div>
</div>
</div>
<div class="container--fluid">
<div class="container__row">
____
_.-'78o `"`-~._
,o888o. .o888o, ''-.
,88888P `78888P..______.]
/_..__..-~-~"" | / __.'
`-._ /""| _..-''
"`-~-~-\ `\
| ;.-""-~..
| ,8o. o88. `.
`;888P `788P :
@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.
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 / sertice.ts
Created April 27, 2017 07:05 — forked from deebloo/sertice.ts
Angular2 Service Pattern for configurability and reusability
// Standard Service Class
export class MyService {
constructor(private config) { }
}
// factory for creating new instances of the service
function createMyService(config = {}) {
return new MyService(config);
}
var myWorker = $worker().create(function () {
self.postMessage('Hello World');
});
myWorker.run().then(function (e) {
console.log(e.data); // 'Hello World'
});