Skip to content

Instantly share code, notes, and snippets.

View ryyppy's full-sized avatar
🚢
shipping

Patrick Ecker ryyppy

🚢
shipping
View GitHub Profile
@ryyppy
ryyppy / index.js
Created March 5, 2017 08:27
Why JavaScript debugging is hard
/**
* What is the result of this program?
*/
function g() {
console.log('g called')
}
function f() {
g()
@ryyppy
ryyppy / Dockerfile
Last active March 7, 2017 22:16
ReasonML Dockerfile for AWS Lambda (not finished yet)
FROM amazonlinux:2016.09
# INSTALL NODE AND YARN
WORKDIR /app
ENV NPM_CONFIG_LOGLEVEL info
ENV NODE_VERSION 7.7.0
# gcc -> needed for ocaml
RUN yum install -y xz git gcc m4 which \

Keybase proof

I hereby claim:

  • I am ryyppy on github.
  • I am ryyppy (https://keybase.io/ryyppy) on keybase.
  • I have a public key whose fingerprint is F6DE 3E10 8B7D 1A07 E148 7892 7F21 0FB3 C17E AE67

To claim this, I am signing this object:

@ryyppy
ryyppy / *Backtrace*
Created January 20, 2018 14:20
bs-jest enter describe scope -> Emacs freeze
Debugger entered--Lisp error: (quit)
(let ((len (length str))) (and (> (point) len) (equal str (buffer-substring-no-properties (- (point) len) (point)))))
reason-looking-back-str("*/")
(if (reason-looking-back-str "*/") (backward-char))
(let ((starting (point))) (skip-chars-backward "[:space:]\n") (if (reason-looking-back-str "*/") (backward-char)) (if (reason-in-str-or-cmnt) (reason-rewind-past-str-cmnt)) (if (/= starting (point)) (reason-rewind-irrelevant)))
reason-rewind-irrelevant()
(while (and (= current-level (reason-paren-level)) (not (looking-at reason-binding))) (reason-rewind-irrelevant) (reason-rewind-to-beginning-of-current-level-expr))
(save-excursion (while (and (= current-level (reason-paren-level)) (not (looking-at reason-binding))) (reason-rewind-irrelevant) (reason-rewind-to-beginning-of-current-level-expr)) (+ (current-column) reason-indent-offset))
(let ((current-level (reason-paren-level))) (save-excursion (while (and (= current-level (reason-paren-level)) (not (looking-at
/* @flow */
import { takeLatest } from 'redux-saga';
import { call, put } from 'redux-saga/effects';
/**
* STATIC ENVIRONMENT
*/
export const config = {
@ryyppy
ryyppy / SidebarNavLink.bs.js
Last active January 16, 2019 11:43
GenType variants example
@ryyppy
ryyppy / Button.re
Last active January 18, 2019 16:01
Button Variant with Reason
open Util;
module Secondary = {
let component = ReasonReact.statelessComponent(__MODULE__);
type active = {
href: string,
target: string,
};
type kind =
@ryyppy
ryyppy / workerconf-reasonml.md
Created May 20, 2019 07:39
WorkerConf Reason Workshop

WorkerConf ReasonML Workshop

In this workshop, Patrick will introduce you to the ReasonML platform to build highly type-safe ReactJS applications with the BuckleScript JavaScript compiler.

The goal of this workshop is to build a little webapplication, with following rough outline:

  • Setting up the Development environment (VSCode)
  • Little introduction to the ReasonML platform
  • NextJS as the basis for our application
  • Write our first ReasonReact components to build simple UI
@ryyppy
ryyppy / 0_functor.re
Last active June 3, 2019 18:33
Reason Functor Example
/*
Let's Assume we want to have a Functor which creates a new Module from
a specific Component Model
The Functor recieves another Module named `Component`, which needs to satisfy certain constraints:
- Component requires an abstract type t (no matter what concrete type)
- It also needs to implement a `render` function which gets said type t and returns a `string`
Also, the newly created module will then contain a function `doSomething`, which will handle any
instance of `Component.t`. So our `Component` also will need a function to create an instance for that,
@ryyppy
ryyppy / prettier.config.js
Created June 7, 2019 10:44
VIM + Prettier Config Workaround
/* Needed, so vim + prettier is working correctly, otherwise prettier is yielding a weird parsing error message */
module.exports = {
trailingComma: 'es5',
tabWidth: 2,
semi: false,
singleQuote: true,
parser: 'babylon',
overrides: [
{