Skip to content

Instantly share code, notes, and snippets.

View foxundermoon's full-sized avatar
🏠
Looking for a remote job

foxundermoon foxundermoon

🏠
Looking for a remote job
View GitHub Profile
class ShadowsocksKcp < Formula
@name="shadowsocks-kcp"
desc "Kcptun for speed up shadowsocks"
# homepage "https://github.com/xtaci/kcptun"
# url "https://github.com/xtaci/kcptun/releases/download/v20161207/kcptun-darwin-amd64-20161207.tar.gz"
# url "http://data.vvfox.com/tools/shadowsocks-kcp-1.0.0.tar"
# sha256 "751f79884e83510d6052f6d04908115f6e141b779f2b00882e4019ea2b0bbd58"
# head "https://github.com/xtaci/kcptun.git"
@foxundermoon
foxundermoon / HOC.js
Created February 1, 2020 11:49 — forked from Restuta/HOC.js
React HOC (Higher Order Component) Example
/* HOC fundamentally is just a function that accepts a Component and returns a Component:
(component) => {return componentOnSteroids; } or just component => componentOnSteroids;
Let's assume we want to wrap our components in another component that is used for debugging purposes,
it just wraps them in a DIV with "debug class on it".
Below ComponentToDebug is a React component.
*/
//HOC using Class
//it's a function that accepts ComponentToDebug and implicitly returns a Class
let DebugComponent = ComponentToDebug => class extends Component {