Skip to content

Instantly share code, notes, and snippets.

Adrian Schaedle sch

Block or report user

Report or block sch

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 dabblet.css
.container {
text-shadow: 0.1em 0.1em pink;
.larger {
font-size: 30px;
.large-shadow {
font-size: 30px;
sch / server.ts
Created Mar 14, 2019
Handling routes with a function instead of middleware
View server.ts
import * as express from "express";
const server = express();
server.get("/posts", withAuthenticatedUser(function(req, res, user) {
const posts = getPostsForUser(user);
sch / Main.elm
Last active Jan 30, 2019
Minimum Elm boilerplate
View Main.elm
module Main exposing (main)
import Browser
import Html exposing (Html, button, div, text)
import Html.Events exposing (onClick)
type alias Model =
{ count : Int }
sch /
Last active Sep 30, 2018
Elm as an NPM dependency

Sometimes you may want to have more than one version of Elm installed on your computer.

It could be that you're in the process of upgrading multiple projects, and you'd like to have one in 0.18 and another in 0.19. It could be you want to pin your version of Elm to something specific so you can be sure all the members of your team are using the same one. It could be you're relying on lots of Elm-related tooling, and you want to make sure you have the right combination for a specific project.

One option is to piggy-back on top of the [Node Package Manager][npm], and explicitly declare which version of Elm you'd like to use. The elm binary is wrapped up as a node module with a bit of metadata:

$ npm info elm@latest

elm@0.19.0-bugfix2 | BSD-3-Clause | deps: 1 | versions: 33

Keybase proof

I hereby claim:

  • I am sch on github.
  • I am schaedle ( on keybase.
  • I have a public key ASBSgEE6xKGv4W9Ds7EPdZN6LnICezwpCxWiYPw7Wan6kgo

To claim this, I am signing this object:

sch / namespace.clj
Last active Oct 25, 2015
Clojure namespace wishlist
View namespace.clj
(ns om-tutorial.core
(:require [goog.dom :as gdom]
[ :as om :refer-macros [defui]]
[om.dom :as dom]
;; simple maps do it better:
(ns om-tutorial.core
(:require [goog.dom {:alias gdom}]
View quix.txt
bit javascript:var%20e=document.createElement('script');e.setAttribute('language','javascript');e.setAttribute('src','');document.body.appendChild(e);void(0); Make a link
cal javascript:var%20s;if(window.getSelection){s=window.getSelection();}else{s=document.selection.createRange().text;}var%20t=prompt('Please%20enter%20a%20description%20for%20the%20event',s);if(t){void(''+t+'&action=TEMPLATE&pprop=HowCreated%3AQUICKADD'),'gcal'));}else{void(s);} Add event to Google Calendar
eye javascript:void(''%20+%20encodeURIComponent(document.URL))); TinyEye: Where's this image from?
gsub javascript:var%20b=document.body;if(b){void(z=document.createElement('script'));void(z.src='');void(b.appendChild(z));}else{location='
You can’t perform that action at this time.