Skip to content

Instantly share code, notes, and snippets.

View Elity's full-sized avatar
🎯
Focusing

Fighting Elity

🎯
Focusing
View GitHub Profile
@Elity
Elity / hotkeys.md
Created February 6, 2023 15:24 — forked from simonsmith/hotkeys.md
List of Bash hotkeys for Mac

Bash Keyboard Shortcuts - Mac

Enable Option Key as Meta in iTerm. Set as Esc+ - http://stackoverflow.com/a/438892

Moving the cursor

  • Ctrl + a Go to the beginning of the line (Home)
  • Ctrl + e Go to the End of the line (End)
  • Ctrl + p Previous command (Up arrow)
  • Ctrl + n Next command (Down arrow)
@Elity
Elity / 01.bash_shortcuts_v2.md
Created February 6, 2023 15:22 — forked from tuxfight3r/01.bash_shortcuts_v2.md
Bash keyboard shortcuts

Bash Shortcuts

visual cheetsheet

Moving

command description
ctrl + a Goto BEGINNING of command line
@Elity
Elity / Apple_mobile_device_types.txt
Last active October 30, 2022 08:13 — forked from adamawolf/Apple_mobile_device_types.txt
List of Apple's mobile device codes types a.k.a. machine ids (e.g. `iPhone1,1`, `Watch1,1`, etc.) and their matching product names
i386 : iPhone Simulator
x86_64 : iPhone Simulator
arm64 : iPhone Simulator
iPhone1,1 : iPhone
iPhone1,2 : iPhone 3G
iPhone2,1 : iPhone 3GS
iPhone3,1 : iPhone 4
iPhone3,2 : iPhone 4 GSM Rev A
iPhone3,3 : iPhone 4 CDMA
iPhone4,1 : iPhone 4S
@Elity
Elity / what-forces-layout.md
Created December 23, 2021 07:54 — forked from paulirish/what-forces-layout.md
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@Elity
Elity / deepClone.js
Created November 13, 2019 08:26
深度拷贝,处理循环引用
function deepClone(data) {
const cache = new WeakSet();
return JSON.parse(JSON.stringify(data, function(key, value) {
if (typeof value === 'object' && value !== null) {
if (cache.has(value)) return;
cache.add(value);
}
return value;
}));
@Elity
Elity / ExtractTTFInfoFromTTC.c
Created September 10, 2019 09:04 — forked from honood/ExtractTTFInfoFromTTC.c
获取TTC中所有的TTF字体的信息源码
//
// 原文: http://my.csdn.net/sxjiake/code/detail/13833
//
// 感谢 sxjiake
//
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <locale.h>
@Elity
Elity / introrx.md
Created April 23, 2018 05:02 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing