Skip to content

Instantly share code, notes, and snippets.

View tylerlong's full-sized avatar

Tyler Liu tylerlong

View GitHub Profile
@tylerlong
tylerlong / README.md
Last active January 19, 2022 16:05
Why is SubX more developer-friendly than Redux & MobX?

Why is SubX more developer-friendly than Redux & MobX?

First of all, what is SubX?

SubX, Subject X, Reactive Subject. Pronunciation: [Sub X]

SubX is next generation state container. It could replace Redux and MobX in our React apps.

Features of SubX

@vvgomes
vvgomes / foo.js
Last active August 10, 2021 18:10
Ramda vs Lodash
var _ = require("lodash");
var R = require("ramda");
var companies = [
{ name: "tw", since: 1993 },
{ name: "pucrs", since: 1930 },
{ name: "tw br", since: 2009 }
];
var r1 = _(companies).chain()
@JonAbrams
JonAbrams / gist:7edaa3545f8fd11a1919
Created July 9, 2015 23:15
How to add getter/setter methods to ES6 classes after the class is created
// Also works for normal methods
class User {
constructor (first, last) {
this.firstName = first;
this.lastName = last;
}
}
Object.defineProperty(User.prototype, 'name', {
get: function () {
@aksakalli
aksakalli / SimpleHTTPServer.cs
Last active February 27, 2024 16:36
SimpleHTTPServer in C#
// MIT License - Copyright (c) 2016 Can Güney Aksakalli
// https://aksakalli.github.io/2014/02/24/simple-http-server-with-csparp.html
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net.Sockets;
using System.Net;
using System.IO;
@adamgit
adamgit / .gitignore
Last active March 25, 2024 15:39
.gitignore file for Xcode4 / OS X Source projects
#########################
# .gitignore file for Xcode4 and Xcode5 Source projects
#
# Apple bugs, waiting for Apple to fix/respond:
#
# 15564624 - what does the xccheckout file in Xcode5 do? Where's the documentation?
#
# Version 2.6
# For latest version, see: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects
#