Skip to content

Instantly share code, notes, and snippets.

View jerrylau91's full-sized avatar
🎯
Focusing

debuluoooo jerrylau91

🎯
Focusing
View GitHub Profile
@jerrylau91
jerrylau91 / iterm-profile.json
Created November 19, 2022 22:44
iTerm Profile Settings
{
"Use Non-ASCII Font" : true,
"Tags" : [
],
"Ansi 12 Color" : {
"Green Component" : 0.57647058823529407,
"Blue Component" : 0.97647058823529409,
"Red Component" : 0.74117647058823533
},
@jerrylau91
jerrylau91 / rem.js
Created August 3, 2021 09:11
移动端 REM 适配方案
;(function (designWidth, maxWidth) {
var doc = document,
win = window;
var docEl = doc.documentElement;
var tid;
var rootItem, rootStyle;
function refreshRem() {
var width = docEl.getBoundingClientRect().width;
if (!maxWidth) {
@landsman
landsman / squash-commits.sh
Created July 26, 2017 13:56 — forked from jbub/squash-commits.sh
git squash last two commits into one
git rebase --interactive HEAD~2
# we are going to squash c into b
pick b76d157 b
pick a931ac7 c
# squash c into b
pick b76d157 b
s a931ac7 c
@CraigRodrigues
CraigRodrigues / bubbleSort.js
Last active October 17, 2019 11:28
Bubble Sort in Javascript
// Normal
const bubbleSort = function(array) {
let swaps;
do {
swaps = false;
for (let i = 0; i < array.length - 1; i++) {
if (array[i] > array[i + 1]) {
let temp = array[i + 1];
array[i + 1] = array[i];
array[i] = temp;
@jerrylau91
jerrylau91 / package.json
Created March 16, 2016 02:11
npm scripts as a build tool
{
"scripts": {
"clean": "rm -f resources/css/style.css",
"autoprefixer": "postcss -u autoprefixer -r resources/css/style.css",
"scss": "node-sass --output-style compressed --source-map true resources/sass/PPP.scss resources/css/style.css",
"serve": "browser-sync start --proxy 'ping.dev' --files 'resources/css/*.css, resources/images/*'",
"build:css": "npm run scss && npm run autoprefixer",
"build": "npm run build:css",
"watch:css": "onchange 'resources/sass/*.scss' -- npm run build:css",
"start": "npm-run-all -p serve watch:css",
@subfuzion
subfuzion / curl.md
Last active May 6, 2024 09:53
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@jonsuh
jonsuh / .bash_profile
Last active February 16, 2024 17:17
Bash echo in color
# ----------------------------------
# Colors
# ----------------------------------
NOCOLOR='\033[0m'
RED='\033[0;31m'
GREEN='\033[0;32m'
ORANGE='\033[0;33m'
BLUE='\033[0;34m'
PURPLE='\033[0;35m'
CYAN='\033[0;36m'
@jerrylau91
jerrylau91 / correct use "em" with "rem" without "px"
Last active March 7, 2016 07:15
correct use "em" with "rem" without "px"
:root {
font-size: 16px;
}
// Or you can use html
// html {
// font-size: 16px;
// }
@jerrylau91
jerrylau91 / centos6.5_nginx
Created November 23, 2015 02:22 — forked from ifels/centos6.5_nginx
centos 6.5 nginx安装与配置
第一步,在/etc/yum.repos.d/目录下创建一个源配置文件nginx.repo:
cd /etc/yum.repos.d/
vim nginx.repo
填写如下内容:
[nginx]
name=nginx repo
@jerrylau91
jerrylau91 / rc meaning
Created November 11, 2015 07:57
What does rc mean as a file name?
The ‘rc’ suffix goes back to Unix's grandparent, CTSS.
It had a command-script feature called "runcom". Early
Unixes used ‘rc’ for the name of the operating system's
boot script, as a tribute to CTSS runcom.
"http://stackoverflow.com/questions/11030552/what-does-rc-mean-in-dot-files"