Skip to content

Instantly share code, notes, and snippets.

Stephen Bannasch stepheneb

Block or report user

Report or block stepheneb

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View myChompUntil.elm
module ChompUntilAfter exposing (myChompUntil)
import Parser.Advanced as A exposing ((|.), (|=))
type alias Parser a =
MyParser Never Problem a
type Problem
View Decode2.elm
module Decode2 exposing (Images, Part, Status(..), flags, images, jsonFlags, jsonStatus, jsonImages, jsonName, jsonPart, jsonParts, jsonPartInvalid, name, part, status)
import Json.Decode as D
-- Inspired by Joël Quenneville's article:
-- https://thoughtbot.com/blog/5-common-json-decoders
type alias Flags =
{ parts : List Part
@stepheneb
stepheneb / DecodeElmType.elm
Last active May 18, 2019
Decoding an Elm type from a json object
View DecodeElmType.elm
module DecodeElmType exposing (Status(..), json, statusDecoder, statusFieldToStringDecoder, statusFromStringDecoder)
import Json.Decode exposing (..)
type Status
= Queued
| Started
| Complete
View gist:d22be73a1bb3a3a58ff717528b6e769e
% git clone git@github.com:joshuaclayton/elm-ports-example.git
Cloning into 'elm-ports-example'...
remote: Enumerating objects: 251, done.
remote: Total 251 (delta 0), reused 0 (delta 0), pack-reused 251
Receiving objects: 100% (251/251), 126.73 KiB | 1.62 MiB/s, done.
Resolving deltas: 100% (87/87), done.
apps % cd elm-ports-example
elm-ports-example master % atom .
elm-ports-example master % yarn
yarn install v1.15.2
View pg_settings.txt
name | setting | short_desc
----------------------------------------+--------------------------------------------+-----------------------------------------------------------------------------------
allow_system_table_mods | off | Allows modifications of the structure of system tables.
application_name | psql | Sets the application name to be reported in statistics and logs.
archive_command | (disabled) | Sets the shell command that will be called to archive a WAL file.
archive_mode | off | Allows archiving of WAL files using archive_command.
archive_timeout | 0 | Forces a switch to the next WAL file if a new file has not been start
View pg_settings.html
<table border="1">
<tr>
<th align="center">name</th>
<th align="center">setting</th>
<th align="center">short_desc</th>
</tr>
<tr valign="top">
<td align="left">allow_system_table_mods</td>
<td align="left">off</td>
<td align="left">Allows modifications of the structure of system tables.</td>
@stepheneb
stepheneb / d3-doubleclick.js
Created Nov 1, 2018
double-clicking using D3.js in the browser
View d3-doubleclick.js
d3DomUIElement.on("click", clickAndDoubleClick(toggleSelectionHandler, selectAndStartEditingHandler));
clickAndDoubleClick = function(singlecallback, doublecallback) {
var f;
f = void 0;
return f = (function() {
var doubleclick, firstclick, g, t1, timer;
firstclick = true;
timer = null;
t1 = null;
@stepheneb
stepheneb / register-and-callback-when-available.js
Last active Nov 1, 2018
very simple javascript module dependency manager
View register-and-callback-when-available.js
// This simple module makes available a UUID generator created by Jeff Ward
//
// This module will be available under the global App.UUID
//
// After this module has completely loaded it registers itself so other modules that
// depend on it being present can wait until it is available to complete their startup.
**
* Fast UUID generator, RFC4122 version 4 compliant.
@stepheneb
stepheneb / gist:543f626ee6bdd8c4f40a
Created Apr 8, 2015
errors building mod_tile on Mac OS X 10.1`0
View gist:543f626ee6bdd8c4f40a
$ ./autogen.sh
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force -I m4
autoreconf: configure.ac: tracing
autoreconf: running: glibtoolize --copy --force
glibtoolize: putting auxiliary files in '.'.
glibtoolize: copying file './ltmain.sh'
glibtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
glibtoolize: copying file 'm4/libtool.m4'
@stepheneb
stepheneb / gist:7553133
Created Nov 19, 2013
crash report cloning repo with GitX
View gist:7553133
Process: GitX [2973]
Path: /Applications/GitX.app/Contents/MacOS/GitX
Identifier: net.phere.GitX
Version: 0.14.95 dev (0.14.95)
Code Type: X86-64 (Native)
Parent Process: launchd [243]
Responsible: GitX [2973]
User ID: 503
Date/Time: 2013-11-19 16:27:49.543 -0500
You can’t perform that action at this time.