Skip to content

Instantly share code, notes, and snippets.

View chengcyber's full-sized avatar

Cheng Liu chengcyber

  • TikTok
  • San Jose
View GitHub Profile
@cpsubrian
cpsubrian / README.md
Last active March 27, 2023 13:34
React decorators for redux/react-router/immutable 'smart' components.

This is my typical decorator stack for a 'smart component' used as the component for react-router route. Note some code is missing here but this should give you the idea.

Example usage:

StateDetailsScene.js

import React from 'react'
import _ from 'lodash'
import route from 'core/decorators/route'
# 你可以从该 URL 下载这个配置文件: http://surge.run/config-example/ios.conf
# 用编辑器编辑后,再通过 iTunes, URL, AirDrop 或者 iCloud Drive 复制回 iOS 设备
# Version 2.0
[General]
# 日志等级: warning, notify, info, verbose (默认值: notify)
loglevel = notify
# 跳过某个域名或者 IP 段,这些目标主机将不会由 Surge Proxy 处理。(在 macOS
# 版本中,如果启用了 Set as System Proxy, 那么这些值会被写入到系统网络代理
# 设置中.)
@olih
olih / jq-cheetsheet.md
Last active October 19, 2025 15:40
jq Cheet Sheet

Processing JSON using jq

jq is useful to slice, filter, map and transform structured json data.

Installing jq

On Mac OS

brew install jq

@jlongster
jlongster / immutable-libraries.md
Last active November 7, 2024 13:11
List of immutable libraries

A lot of people mentioned other immutable JS libraries after reading my post. I thought it would be good to make a list of available ones.

There are two types of immutable libraries: simple helpers for copying JavaScript objects, and actual persistent data structure implementations. My post generally analyzed the tradeoffs between both kinds of libraries and everything applies to the below libraries in either category.

Libraries are sorted by github popularity.

Persistent Data Structures w/structural sharing

https://raw.githubusercontent.com/alwei/dotfiles/3760650625663f3b08f24bc75762ec843ca7e112/.vimrc
https://raw.githubusercontent.com/anekos/my-config/0afcd78455743a4d3fad31674136428052dc6ebe/.vimrc
https://raw.githubusercontent.com/sigwyg/dotfiles/8c70c4032ebad90a8d92b76b1c5d732f28559e40/.vimrc
https://raw.githubusercontent.com/basyura/vimfiles/ee086f25b8c58b8ea6bf025d26ebc11ae50e6ca1/rc/vimrc
https://raw.githubusercontent.com/osyo-manga/vimrc/9ef0ca9757abcdaa11c76024aa551f0b473624bf/vimrcs/default/vimrc
https://raw.githubusercontent.com/rhysd/dotfiles/8228ebaeab0e022ee7161d0eb9fc633876b0be41/vimrc
https://raw.githubusercontent.com/ebc-2in2crc/vimrc/f1ed88bf0d3668ebf8d702def40625d435f545cd/_vimrc
https://raw.githubusercontent.com/rbtnn/reading-vimrc/a92dae61200f50bd771f3a30c4f5fa06738c9aac/.vimrc
https://raw.githubusercontent.com/ujihisa/config/8c513ac93429e27ce27e6020a7d48e728b809169/_vimrc
https://gist.githubusercontent.com/thinca/3675965/raw/5739da5abedef838ed49b8328d9b29e3dd78bed4/bundle.vim
@rxaviers
rxaviers / gist:7360908
Last active October 21, 2025 00:27
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
/**
Code copyright Dustin Diaz and Ross Harmes, Pro JavaScript Design Patterns.
**/
// Constructor.
var Interface = function (name, methods) {
if (arguments.length != 2) {
throw new Error("Interface constructor called with " + arguments.length + "arguments, but expected exactly 2.");
}
this.name = name;