Skip to content

Instantly share code, notes, and snippets.

View ryyppy's full-sized avatar
🚢
shipping

Patrick Ecker ryyppy

🚢
shipping
View GitHub Profile
/* @flow */
import { takeLatest } from 'redux-saga';
import { call, put } from 'redux-saga/effects';
/**
* STATIC ENVIRONMENT
*/
export const config = {
@ryyppy
ryyppy / proposal.md
Last active May 20, 2023 02:07
A Life on a Commandline - How to never touch a mouse again. Lightning Talk Proposal for ReactiveConf 2016 (https://reactiveconf.com/)

Proposal for this year's Reactive lightning talks @ReactiveConf - If you want to see my talk, star this gist please :-) [Reactive Blogpost][reactive-conference-blogpost]


A life on a Commandline

As a JavaScript developer, could you imagine using something else than Atom, Sublime or other IDE-like text-editors? During their daily work, people wrangle a lot with different applications, editors, windows, browsers and loose a lot of time because of their tools getting in their way.

@ryyppy
ryyppy / hard-dependency.js
Last active July 8, 2022 14:01
Jest: Module Mocking vs. Simple Dependency Injection
// ###############################
// runPackager.js
// ###############################
// In this example, the IO function is tightly coupled with the implementation
import { execFileSync } from 'child_process';
type RunPackagerOptions = {
projectRoot: string, // CWD the react-native binary is being run from
targetDir: string, // Target directory absolute or relative to projectRoot (e.g. 'rna/')
@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
@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 / SidebarNavLink.bs.js
Last active January 16, 2019 11:43
GenType variants example
@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