Skip to content

Instantly share code, notes, and snippets.

View RaymondYe's full-sized avatar

Raymond Yip RaymondYe

View GitHub Profile
@RaymondYe
RaymondYe / README.md
Created August 17, 2020 16:37 — forked from chuyik/README.md
macOS 给 Git(Github) 设置代理(HTTP/SSH)
@RaymondYe
RaymondYe / emojis.json
Created December 18, 2017 12:04 — forked from oliveratgithub/emojis.json
Emoji-list with emojis, names, shortcodes, unicode and html entities [massive list]
{
"emojis": [
{"emoji": "👩‍👩‍👧‍👧", "name": "family_mothers_two_girls", "shortname": "", "unicode": "", "html": "👩‍👩‍👧‍👧", "category": "p", "order": ""},
{"emoji": "👩‍👩‍👧‍👦", "name": "family_mothers_children", "shortname": "", "unicode": "", "html": "👩‍👩‍👧‍👦", "category": "p", "order": ""},
{"emoji": "👩‍👩‍👦‍👦", "name": "family_mothers_two_boys", "shortname": "", "unicode": "", "html": "👩‍👩‍👦‍👦", "category": "p", "order": ""},
{"emoji": "👨‍👩‍👧‍👧", "name": "family_two_girls", "shortname": "", "unicode": "", "html": "👨‍👩‍👧‍👧", "category": "p", "order": ""},
{"emoji": "👨‍👩‍👧‍👦", "name": "family_children", "shortname": "", "unicode": "", "html": "👨‍👩‍👧‍👦", "category": "p", "order": ""},
{"emoji": "👨‍👩‍👦‍👦", "name": "family_two_boys", "shortname": "", "unicode": "", "html": "👨&zw
git config --global https.proxy http://127.0.0.1:1080
git config --global https.proxy https://127.0.0.1:1080
git config --global --unset http.proxy
git config --global --unset https.proxy
#只对github.com
git config --global http.https://github.com.proxy socks5://127.0.0.1:1080
@RaymondYe
RaymondYe / fake-autoplay-audio-ios-safari.html
Created October 22, 2017 08:34 — forked from ufologist/fake-autoplay-audio-ios-safari.html
Fake auto play html audio in iOS Safari the right way
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<title>Fake auto play html audio in iOS Safari the right way</title>
</head>
<body>
<h1>在 iOS Safari 中假装自动播放 HTML5 audio(音乐) 的正确方式</h1>
<p>核心原理: 通过一个用户交互事件来主动 play 一下 audio</p>
@RaymondYe
RaymondYe / http.js
Created September 7, 2017 01:48
axios extend
// Add a request interceptor
axios.interceptors.request.use(function (config) {
// Do something before request is sent
return config;
}, function (error) {
// Do something with request error
return Promise.reject(error);
});
// Add a response interceptor
@RaymondYe
RaymondYe / rem.js
Last active May 4, 2016 15:43
Font sizing with rem
(function(win, doc) {
// Setting your Design Width
var designWidth = 640;
// Init devicePixelRatio
var initPixelRatio = function() {
var $html = document.documentElement;
var dpr = window.devicePixelRatio;
var rdpr = null;

name: inverse layout: true class: center, middle, inverse

#并发,core.async 和 JavaScript .footnote[http://git.io/js-csp]


layout: false

@RaymondYe
RaymondYe / why-curry-helps.md
Created May 4, 2016 10:43 — forked from jcouyang/why-curry-helps.md
为什么要柯里化(why-curry-helps)slide http://git.io/why-curry-helps 📈

还记得 Haskell Curry吗,

多巧啊, 人家姓 Curry 名 Haskell, 难怪 Haskell 语言会自动柯里化, 呵呵. 但是不奇怪吗, 为什么要柯里化呢. 为什么如此重要导致 Haskell 会默认自动柯里化所有函数, 不就是返回一个部分配置好的函数吗.

我们来看一个 Haskell 的代码.

max 3 4
(max 3) 4
@RaymondYe
RaymondYe / ConstrainImg.css
Created August 6, 2015 08:34
ConstrainImg
.constrain-img{
float: none;
display: block;
height: 256px;
width: 256px;
background-image: url(img/AjaxLoader.gif);
background-repeat: no-repeat;
background-position: center center;
}
@RaymondYe
RaymondYe / dataurl to Blob.js
Last active August 29, 2015 14:24
htmlToImage
# dataURL to Blob
# @params {String} dataurl : data:image/jpeg;base64,xxxxxx
# @return {Blob}
dataurlToBlob: (dataurl)->
datas = dataurl.split(',', 2)
data = window.atob(datas[1])
type = datas[0].split(';')[0].split(':')[1]
name = 'fontImage'+$.now()