Skip to content

Instantly share code, notes, and snippets.

@coreyphillips
coreyphillips / rn-bitcoinjs-lib-5.0.5_Setup.md
Last active August 7, 2019 13:32
How To Add bitcoinjs-lib Version 5.0.5 To A React Native Project

Newer version available. Please see 5.1.1

How To Add bitcoinjs-lib Version 5.0.5 To A React Native Project

Add/Link the following dependencies:

  • yarn add bitcoinjs-lib@5.0.5 react-native-randombytes buffer-reverse buffer@5
  • yarn add --dev rn-nodeify
  • react-native link react-native-randombytes
  • Add the following postinstall to your script in package.json: "postinstall": "rn-nodeify --install buffer,stream,assert,events,crypto,vm --hack && cd node_modules/bs58 && yarn add base-x@3.0.4 && cd ../../"
@coreyphillips
coreyphillips / rn-bitcoinjs-lib-4.0.2_Setup.md
Last active March 12, 2019 16:45
How To Add bitcoinjs-lib Version 4.0.2 To A React Native Project

Newer version available. Please see 4.0.3

How To Add bitcoinjs-lib Version 4.0.2 To A React Native Project

Add/Link the following dependencies:

  • yarn add bitcoinjs-lib@4.0.2 react-native-randombytes buffer-reverse buffer@5
  • yarn add --dev rn-nodeify
  • react-native link react-native-randombytes
  • Add the following postinstall to your script in package.json: "postinstall": "rn-nodeify --install buffer,stream,assert,events,crypto,vm --hack && cd node_modules/bs58 && yarn add base-x@3.0.4 && cd ../../"
@giampaolotrapasso
giampaolotrapasso / Designing Event-Driven Systems links.md
Created August 1, 2018 09:56
List of links from Designing Event-Driven Systems by Ben Stopford
@kobymeir
kobymeir / teamcity_github_pr_branch.py
Last active June 6, 2019 13:26 — forked from dzzh/teamcity_github_pr_branch.py
Inject source and target branches from Github pull request into TeamCity CI
#!/usr/bin/env python
import os
import sys
import json
try:
from urllib.request import Request, urlopen # Python 3
except:
from urllib2 import Request, urlopen # Python 2

Applied Functional Programming with Scala - Notes

Copyright © 2016-2018 Fantasyland Institute of Learning. All rights reserved.

1. Mastering Functions

A function is a mapping from one set, called a domain, to another set, called the codomain. A function associates every element in the domain with exactly one element in the codomain. In Scala, both domain and codomain are types.

val square : Int => Int = x => x * x
@Manouchehri
Manouchehri / rfc3161.txt
Last active May 1, 2024 10:23
List of free rfc3161 servers.
https://rfc3161.ai.moda
https://rfc3161.ai.moda/adobe
https://rfc3161.ai.moda/microsoft
https://rfc3161.ai.moda/apple
https://rfc3161.ai.moda/any
http://rfc3161.ai.moda
http://timestamp.digicert.com
http://timestamp.globalsign.com/tsa/r6advanced1
http://rfc3161timestamp.globalsign.com/advanced
http://timestamp.sectigo.com
// Originally taken from https://github.com/mgtitimoli/await-mutex
class Mutex {
constructor() {
this._locking = Promise.resolve();
this._locked = false;
}
isLocked() {
return this._locked;
@gaearon
gaearon / ReduxMicroBoilerplate.js
Last active March 26, 2020 00:35
Super minimal React + Redux app
import React, { Component } from 'react';
import { createStore, combineReducers, applyMiddleware, bindActionCreators } from 'redux';
import { provide, connect } from 'react-redux';
import thunk from 'redux-thunk';
const AVAILABLE_SUBREDDITS = ['apple', 'pics'];
// ------------
// reducers
// ------------
@ptaoussanis
ptaoussanis / transducers.clj
Last active December 17, 2021 13:54
Quick recap/commentary: Clojure transducers
(comment ; Fun with transducers, v2
;; Still haven't found a brief + approachable overview of Clojure 1.7's new
;; transducers in the particular way I would have preferred myself - so here goes:
;;;; Definitions
;; Looking at the `reduce` docstring, we can define a 'reducing-fn' as:
(fn reducing-fn ([]) ([accumulation next-input])) -> new-accumulation
;; (The `[]` arity is actually optional; it's only used when calling
;; `reduce` w/o an init-accumulator).
@benjchristensen
benjchristensen / EventBus.java
Last active February 24, 2022 03:02
EventBus.java
import rx.Observable;
import rx.subjects.PublishSubject;
import rx.subjects.SerializedSubject;
import rx.subjects.Subject;
/**
* Simple pass-thru event bus with error handling and reconnect.
*/
public class EventBus {