Skip to content

Instantly share code, notes, and snippets.

Edward Chu chuyik

Block or report user

Report or block chuyik

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@chuyik
chuyik / export_keynote.scpt
Created Mar 8, 2019
Keynote Presenter Notes Exporter 演讲者注释导出脚本
View export_keynote.scpt
--==============================
-- Send Keynote Text to Desktop Markdown File
-- Writted By: Richard Dooling https://github.com/RichardDooling/
-- Based on
-- Send Keynote Presenter Notes to Evernote
-- Version 1.0.1
-- Written By: Ben Waldie <ben@automatedworkflows.com>
-- http://www.automatedworkflows.com
-- Version 1.0.0 - Initial release
@chuyik
chuyik / install.sh
Last active Oct 12, 2018
rsync like git
View install.sh
rsync --info=progress2 \
-a -c --progress \
--delete \
--delete-excluded --exclude=".git/" \
/path/to/folder/. /newpath/to/folder/
@chuyik
chuyik / README.md
Last active Aug 2, 2018
Install and Config Rust
View README.md
@chuyik
chuyik / omit.js
Created Jul 25, 2018
Test _.omit performance
View omit.js
const speedy = require('speedy')
const _ = require('lodash')
/**
==================
Test Result
==================
Node v10.1.0
V8 v6.6.346.27-node.6
@chuyik
chuyik / index.bash
Created Jun 4, 2018
Centos 6 curl SSL problem
View index.bash
# use this to debug git fetch
export GIT_CURL_VERBOSE=1
# use aliyun mirror to install new packages
wget -O /etc/yum.repos.d/Alibaba.repo http://mirrors.aliyun.com/repo/Centos-6.repo
yum update nss curl
@chuyik
chuyik / random-match.js
Created Mar 7, 2018
Randomly match elements between two arrays
View random-match.js
/* eslint-disable lodash/import-scope, no-console */
const _ = require('lodash')
const aArr = _.times(4, i => String.fromCharCode(97 + i))
const bArr = _.times(3, i => String.fromCharCode(65 + i))
/**
* 随机组合数组的元素
* 具体逻辑:
* 先随机索引,两两配对。
@chuyik
chuyik / centos_6_repo_setup.sh
Created Jul 13, 2017
各种 centos 6 依赖库
View centos_6_repo_setup.sh
# backup
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
# aliyun
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
# epel
rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
# ius
rpm -Uvh https://centos6.iuscommunity.org/ius-release.rpm
View detect-color-kmeans-euclidean.js
/* 算法一:k-means 加 euclidean */
/*
* This portion was created by referencing the article
* "Using python and k-means to find the dominant colors in images"
*/
// You can see the Python version of this in Charles Leifer's article
function euclidean (point1, point2) {
let s = 0
@chuyik
chuyik / README.md
Last active Jun 11, 2017
用 Deploy Key 或者自定义 SSH Key 下载某个项目
View README.md

配置 ~/.ssh/config

Host github.com-alias-name
  HostName github.com
  IdentityFile ~/.ssh/xxx_key  # private key

下载代码

@chuyik
chuyik / README.md
Last active Oct 15, 2019
macOS 给 Git(Github) 设置代理(HTTP/SSH)
View README.md
You can’t perform that action at this time.