Skip to content

Instantly share code, notes, and snippets.


Sebastian Werner swernerx

View GitHub Profile
swernerx / AutoScrollToTop.js
Last active Jan 7, 2019
Automatic top scrolling in harmony with browsers native book keeping for @reach/router
View AutoScrollToTop.js
import { Location } from '@reach/router'
import React from 'react'
let lastNavigationFromBrowserUI = true
if (typeof window !== 'undefined') {
window.addEventListener('popstate', event => {
lastNavigationFromBrowserUI = true
View loader.js
/* eslint-disable max-params */
import steed from "steed"
import loaderUtils from "loader-utils"
function resolveImageSrc(loaderContext, image, callback) {
if (typeof image.src !== "string") {
return callback(
new Error('Missing image "src" property in Web App Manifest')
swernerx / .babelrc
Last active Apr 26, 2018
Showcasing babel+fast-async issue
View .babelrc
"presets": [
[ "@babel/env", {
// "loose": true,
["transform-regenerator", "transform-async-to-generator"]
swernerx / checkSpelling.js
Last active Jan 18, 2018
Check translation files for spelling issues using the hunspell based "node-spellchecked"
View checkSpelling.js
#!/usr/bin/env node
const checker = require('spellchecker');
const chalk = require('chalk');
const glob = require('glob');
const root = require('app-root-dir').get();
const fs = require('fs-extra');
function check(word) {
if (checker.isMisspelled(word)) {

Keybase proof

I hereby claim:

  • I am swernerx on github.
  • I am swerner ( on keybase.
  • I have a public key whose fingerprint is EB1B E296 359A 3CB7 BE29 5E51 4716 C892 C888 FF70

To claim this, I am signing this object: