Skip to content

Instantly share code, notes, and snippets.

View hechen's full-sized avatar
🎯
Focusing

CHEN hechen

🎯
Focusing
View GitHub Profile
@t-io
t-io / osx_install.sh
Last active October 22, 2023 13:04
Install most of my Apps with homebrew & cask
#!/bin/sh
echo Install all AppStore Apps at first!
# no solution to automate AppStore installs
read -p "Press any key to continue... " -n1 -s
echo '\n'
echo Install and Set San Francisco as System Font
ruby -e "$(curl -fsSL https://raw.github.com/wellsriley/YosemiteSanFranciscoFont/master/install)"
echo Install Homebrew, Postgres, wget and cask
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
@andreacremaschi
andreacremaschi / UITableView+Header
Last active June 28, 2020 04:19
UITableView category to resize table view header using autolayout
UITableView convenience classes for resizing header and footer with autolayout.
@bang590
bang590 / linkmap.js
Last active August 19, 2023 15:24
XCode Linkmap Parser
var readline = require('readline'),
fs = require('fs');
var LinkMap = function(filePath) {
this.files = []
this.filePath = filePath
}
LinkMap.prototype = {
start: function(cb) {
@JaviLorbada
JaviLorbada / FRP iOS Learning resources.md
Last active May 29, 2024 07:33
The best FRP iOS resources.

Videos

@simonarcher
simonarcher / us-state-names-abbrevs.swift
Created March 16, 2015 17:49
US State Names & Abbreviations as Swift Arrays.
var states = ["Alabama",
"Alaska",
"Arizona",
"Arkansas",
"California",
"Colorado",
"Connecticut",
"Delaware",
"Florida",
"Georgia",
@cyio
cyio / README.md
Last active May 18, 2020 21:53
【用户脚本】删除我的微博
  • 模拟人工操作删除微博(按条),需登陆自己的微博主页使用。
  • 每页大楖25条,删完微博会刷新,等加载完继续删。
  • 用户可随时手动关闭微博页面或禁用脚本,以便停止删除操作。
  • 即使弹框“服务繁忙”,也不影响删除操作。
  • 运行时占CPU较高,待优化。

在Chrome+Tampermonkey环境下测试通过

@demoive
demoive / Bash Notes
Last active July 31, 2020 19:07
Reference for commands/utilities for use in CLI on Unix and Mac OS X
# use:
# .bash_profile - only gets executed for login bash shells
# .bashrc - only gets executed for NON-login bash shells for only NON-login shells
# .profile - gets executed for ANY login shell
# .bash_logout - only gets executed for bash shells after logout
# Sets the prompt:
#PS1='\h:\w \u\$ '
#PS2='> '
@vasanthk
vasanthk / System Design.md
Last active June 15, 2024 21:43
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@pauljohanneskraft
pauljohanneskraft / Abstract - StringSubscripts.md
Last active June 25, 2019 10:35
A Swift Int-subscript for Strings

String subscripts

Implementation of string subscripts using Int.

var str = "😂😅😊😜😝"
str[0..<2] = ""
print(str)
// Prints "😊😜😝"
@babhishek21
babhishek21 / range_sum_query_mutable_leetcode.cpp
Last active May 23, 2023 16:21
Range Sum Query for Mutable Arrays using Segment Trees
#include <bits/stdc++.h> // using GCC/G++11
using namespace std;
/**
* Range Sum Query for Mutable Arrays using Segment Trees (LeetCode)
* https://leetcode.com/problems/range-sum-query-mutable/
*
* Build a tree whose nodes represent the entire range. Its two children represent the two halves
* of this range. This continues down the tree with height log(n) until we reach the n individual
* leaves of the tree (each representing a single element).