Skip to content

Instantly share code, notes, and snippets.

const Layout = () => {
const [ref, sticky] = useSticky();
return (
<div className={"layout"} ref={ref}>
<div
className={cx("sticky z-20 top-0", {
"shadow-md": sticky,
})}
>
@stephanschubert
stephanschubert / hyperjs.md
Created November 13, 2020 19:23 — forked from raftheunis87/hyperjs.md
Hyper.js + Hyper.js Plugins + ZSH + Starship + Fira Code + Dark Theme - (macOS)

Hyper.js

@stephanschubert
stephanschubert / Instructions.md
Created January 4, 2019 09:56 — forked from pgilad/Instructions.md
Generate SSL Certificate for use with Webpack Dev Server (OSX)

Generate private key

$ openssl genrsa -out private.key 4096

Generate a Certificate Signing Request

openssl req -new -sha256 \
@stephanschubert
stephanschubert / node-with-brew-and-nvm
Last active June 7, 2017 11:46
Install specific `node` version with `brew` and `nvm`
brew uninstall --force --ignore-dependencies node
brew prune
rm -f /usr/local/bin/npm /usr/local/lib/dtrace/node.d
rm -rf ~/.npm
brew install nvm
mkdir ~/.nvm
nvm install v7.9.0
# Add to .zshrc
@stephanschubert
stephanschubert / .csscomb.json
Created May 19, 2017 11:40
My CSS Comb configuration
{
"remove-empty-rulesets": true,
"always-semicolon": true,
"color-case": "lower",
"block-indent": " ",
"color-shorthand": true,
"element-case": "lower",
"eof-newline": true,
"leading-zero": false,
"quotes": "double",
@stephanschubert
stephanschubert / PinchZoomPan.js
Created December 1, 2016 15:52 — forked from iammerrick/PinchZoomPan.js
React Pinch + Zoom + Pan
import React from 'react';
const MIN_SCALE = 1;
const MAX_SCALE = 4;
const SETTLE_RANGE = 0.001;
const ADDITIONAL_LIMIT = 0.2;
const DOUBLE_TAP_THRESHOLD = 300;
const ANIMATION_SPEED = 0.04;
const RESET_ANIMATION_SPEED = 0.08;
const INITIAL_X = 0;
@stephanschubert
stephanschubert / endpoints.md
Created May 20, 2016 06:57 — forked from derhuerst/_.md
List of HAFAS API Endpoints
#!/bin/bash
# git-cleanup-repo
#
# Author: Rob Miller <rob@bigfish.co.uk>
# Adapted from the original by Yorick Sijsling
#
# * 2015/11/05 - Fixed formatting issues (Stephan Schubert)
KEEP_BRANCHES='(master|staging|ci-[0-9]+)$'
@stephanschubert
stephanschubert / reinstall-everything-brewd.sh
Created July 22, 2015 16:38
Re-install everything brew'd.
#!/bin/bash
for i in `brew list -1`
do
if [[ "$i" == python.* ]] || [[ "$i" == ruby.* ]]
then
continue
fi
brew rm --force $i && brew install $i
done
@stephanschubert
stephanschubert / private_delegate.rb
Created March 26, 2015 07:35
Delegate methods privately (requires ActiveSupport)
class Module
def private_delegate(*methods)
delegate(*methods)
methods.extract_options!
methods.each { |m| private(m) }
end
end