Skip to content

Instantly share code, notes, and snippets.

View YuerLee's full-sized avatar

Yuer Lee YuerLee

  • Tradebeyond (former CBX Software)
  • Taiwan
  • 04:11 (UTC +08:00)
  • LinkedIn in/yuerlee
View GitHub Profile
@paulirish
paulirish / what-forces-layout.md
Last active June 8, 2024 13:18
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
@developius
developius / README.md
Last active April 25, 2024 22:15
Setup SSH keys for use with GitHub/GitLab/BitBucket etc

Create a new repository, or reuse an existing one.

Generate a new SSH key:

ssh-keygen -t rsa -C "your_email@example.com"

Copy the contents of the file ~/.ssh/id_rsa.pub to your SSH keys in your GitHub account settings (https://github.com/settings/keys).

Test SSH key:

@dwarcher
dwarcher / _debugger.ejs
Created March 19, 2015 14:43
Dead simple way to debug print in HARP.js
<script>
console.log("--- HARP Debugger --");
console.log(<%- JSON.stringify(inspect) %>);
// Just check your console in chrome to see and inspect the variable.
</script>
@jaceju
jaceju / web_development_with_laravel_5.md
Last active July 12, 2023 06:34
Laravel 5 測試起手式

Web Development with Laravel 5

目標

如何在開發的過程中加入測試。

  1. Model
  2. Repository
  3. Controller
  4. Auth
@vitorbritto
vitorbritto / rm_mysql.md
Last active May 20, 2024 19:44
Remove MySQL completely from Mac OSX

Remove MySQL completely

  1. Open the Terminal

  2. Use mysqldump to backup your databases

  3. Check for MySQL processes with: ps -ax | grep mysql

  4. Stop and kill any MySQL processes

  5. Analyze MySQL on HomeBrew:

    brew remove mysql
    

側欄

folder:

    "bold_folder_labels": true,

編輯區

@nl5887
nl5887 / transfer.fish
Last active March 22, 2022 09:07
Bash and zsh alias for transfer.sh. Transfers files and directories to transfer.sh.
function transfer
if test (count $argv) -eq 0
echo "No arguments specified. Usage:\necho transfer /tmp/test.md\ncat /tmp/test.md | transfer test.md"
return 1
end
## get temporarily filename, output is written to this file show progress can be showed
set tmpfile ( mktemp -t transferXXX )
## upload stdin or file
@asfdfdfd
asfdfdfd / MegaRasterize.js
Last active July 23, 2021 15:19
Adobe Illustrator CS6 script that rasterizes every GroupItem from the first layer of active document to the separate png file.
function captureImage(fileName, document, clipRect) {
var fileOutput = new File("/tmp/exportpng/" + fileName);
var imageCaptureOptions = new ImageCaptureOptions();
imageCaptureOptions.resolution = 300;
imageCaptureOptions.transparency = true;
document.imageCapture(fileOutput, clipRect, imageCaptureOptions);
}
@staltz
staltz / introrx.md
Last active June 7, 2024 23:39
The introduction to Reactive Programming you've been missing
@visioncan
visioncan / CasksInstall.sh
Last active December 29, 2021 01:56
CasksInstall
#!/bin/bash
# xcode command tool
xcode-select --install
# check
xcode-select -p
# homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"