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 / postgresql-debugger-install-ubuntu
Created February 15, 2017 09:58 — forked from jhngrant/postgresql-debugger-install-ubuntu
Installing the PL/pgSQL Debugger Extension (pldbgapi) for pgAdmin III on PostgreSQL 9.4 and Ubuntu 14.10
# PostgreSQL can be on a remote server but you'll need root privileges in Linux and superuser in PostgreSQL.
# First install build tools
sudo su
aptitude install build-essential
aptitude install postgresql-server-dev-9.4
# Clone and build the PL/pgSQL server-side debugger
class TodosService {
constructor(private @Inject(API_CONFIG) api, private http: Http) {}
getTodos() {
return http.get(this.api.todos);
}
}
export function getTodos() {
return {
type: API_REQUEST,
payload: {
url: "http://api.com/todos",
method: "GET",
onError: GET_TODOS_ERROR,
onSuccess: GET_TODOS_SUCCESS
}
}
@sethbergman
sethbergman / reporter_to_airtable.rb
Created March 16, 2017 09:55 — forked from craigeley/reporter_to_airtable.rb
An example of moving Reporter entries to Airtable in near-real time using Reporter's JSON output and the Airtable API.
#!/usr/bin/env ruby
# Scipt Example for Moving Reporter Entries to Airtable Rows in near-real time
require 'time'
require 'json'
# To prevent encoding errors on OSX
if RUBY_VERSION =~ /2.*.*/
Encoding.default_external = Encoding::UTF_8
Encoding.default_internal = Encoding::UTF_8
<script id="jsbin-javascript">
var name = this.name
var age = this.age
var date = this.date
var arr = [age, name, date]
var replace = toString((/\d+0-9/, arr))
var filter = "Ohh Yeah! Cool Aid Man!"
console.log('=====> Before Arrays are Defined...')
console.log(arr)
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="Concatinate multiple textareas live." />
<meta charset="utf-8">
<title>JS Bin</title>
<style id="jsbin-css">
body {
font-family: Helvetica Neue, Helvetica, sans-serif;
}
@sethbergman
sethbergman / xterm-256color.svg
Created April 21, 2017 06:42 — forked from jasonm23/xterm-256color.svg
Xterm 256color mode color chart, organised into sections.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@sethbergman
sethbergman / index.html
Created April 23, 2017 23:15 — forked from devoncarew/index.html
Sunflower
<!-- Copyright 2011 the Dart project authors. All rights reserved.
Use of this source code is governed by a BSD-style license
that can be found in the LICENSE file. -->
<h2>Dr. Fibonacci's Sunflower Spectacular</h2>
<div>
<canvas id="canvas" width="300" height="300"></canvas>
</div>
@sethbergman
sethbergman / spa-server.js
Last active May 5, 2017 00:10 — forked from deebloo/spa-server.js
A small sample server for SPA apps with compression.
// var fallback = require('express-history-api-fallback');
// var express = require('express');
// var compress = require('compression');
// var app = express();
// var root = __dirname + '/dist';
// app.use(compress());
// app.use(express.static(root));
// app.use(fallback('index.html', { root: root }));
var myWorker = $worker().create(function () {
self.postMessage('Hello World');
});
myWorker.run().then(function (e) {
console.log(e.data); // 'Hello World'
});