Skip to content

Instantly share code, notes, and snippets.

View djyde's full-sized avatar
😾
Working on my full time job.

Randy djyde

😾
Working on my full time job.
View GitHub Profile
@djyde
djyde / color.js
Created June 6, 2015 11:20
Material Color
var colors = ["#F44336","#E91E63","#9C27B0","#673AB7","#3F51B5","#2196F3","#03A9F4","#00BCD4","#009688","#4CAF50","#8BC34A","#CDDC39","#FFEB3B","#FFC107","#FF9800","#FF5722","#795548","#9E9E9E","#607D8B","#000000"];
@djyde
djyde / gfwlist.js
Created July 24, 2015 12:06
Shadowsocks PAC
// Generated by gfwlist2pac in precise mode
// https://github.com/clowwindy/gfwlist2pac
var proxy = "SOCKS5 127.0.0.1:1080; SOCKS 127.0.0.1:1080; DIRECT;";
var rules = [
"fastly.net",
"feedly.com",
"slack.com",
".lsxszzg.com",
@djyde
djyde / collision.js
Last active December 28, 2015 03:47
collision
class Component {
constructor(el){
this.$el = el
}
static use(elArray){
console.log(elArray)
}
moveTo(position){
@djyde
djyde / itunes.ejs
Created January 6, 2016 14:46
itunes feed
<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0">
<channel>
<link><%- encodeURI(url) %></link>
<language>zh-CN</language>
<copyright>&amp;#x2117; &amp;amp; &amp;#xA9; 2016 JSNext.fm</copyright>
<itunes:author>JSNext.fm</itunes:author>
<itunes:summary>JSNext Podcast 是由 Randy, Howard, 阴明 主持的前端技术类中文播客节目,讨论时下前端技术相关的一切,争取每期邀请符合主题的优秀工程师一起聊聊。希望用 podcast 形式记录前端技术发展重要的每一步。</itunes:summary>
<description><%-: config.description %></description>
<itunes:owner>
@djyde
djyde / response.js
Created June 23, 2016 04:06
napi response
// request
{ method: 'PATCH',
url: 'http://napi.ucweb.com/3/classes/recoitem/objects/378149604679737',
headers: { 'Content-Type': 'application/json;charset=UTF-8' },
useQuerystring: true,
qs:
{ _app_id: '3fea7415ecd54d6a8064debf385b64fa',
_time_stamp: 1466654628,
_token: 'f0388f61a9d785c2a618871c093050ee' },
body: '{"raw_item":{"title":"5 terrible illnesses that genetic engineering could eliminate forever","channel":[],"content":"<div><res-image id=\\"6c69a21ce4\\"></res-image></div><div>The dangers of editing the human genome are well known. The significance of changing small aspects of people, tweaking them to our liking, means that even a mostly fruitless attempt to <a href=\\"http://www.businessinsider.com/chinese-scientists-genetic-modification-human-embryo-crispr-2015-4\\">edit human embryos</a> sparked widespread criticism — and fear that designer babies could be right around the corner.</div><div>But the potential to use these same technologies to cure intractable diseases is hu
@djyde
djyde / presentation.md
Last active July 31, 2016 02:34
JavaScript to Native

JavaScript to Native

珠三角技术沙龙演讲稿

大家好,很高兴能在这里跟大家交流和分享前端技术。

我的名字叫卢涛南,英文名是 Randy。13 岁的时候在一位朋友的影响下开始写代码。一年前我从大学正式退学,目前就职于阿里 UC。

入场的时候大家看到我穿着 Vue 的 T-shirt, 都以为我是过来分享 Vue 的东西,其实不是,让大家失望了(笑),不过我即将要讲的其实和 Vue 有很大的关系。之所以分享关于 JavaScript 和 Native 的主题,是因为我在高中毕业后做过一段时间的 Android 开发。我很喜欢做 App,但是很快我遇到了很多困难。首先是我这台 Mackbook Air 配置很低,只有 4g 内存,随着整个 Project 越来越大,编译起来就越来越吃力,甚至编辑一个 XML Layout 都会卡,当时我只是一个穷学生,没有条件换一台 Macbook Pro,所以我只能忍受着。第二个麻烦是 Native App 开发不像前端开发,一个改动不是一个 F5 就能生效的,需要重新编译。并且我觉得 Native App 的样式布局没有 CSS 写得爽。于是我开始尝试利用前端技术来完成 App 开发。

@djyde
djyde / Preferences.sublime-settings
Created August 8, 2016 06:06
sublime preference
{
"always_show_minimap_viewport": true,
"binary_file_patterns":
[
"*.jpg",
"*.jpeg",
"*.png",
"*.gif",
"*.ttf",
"*.tga",
@djyde
djyde / default.sublime-keymap
Created August 8, 2016 06:07
Sublime Keymap
[
{
"keys": ["ctrl+e"],
"command": "move_to",
"args": {"to": "eol", "extend": false}
},
{
"keys": ["ctrl+a"],
"command": "move_to",
"args": {"to": "bol", "extend": false}
@djyde
djyde / settings.json
Created August 8, 2016 06:08
vscode settings
// Place your settings in this file to overwrite the default settings
{
"editor.tabSize": "2",
"editor.insertSpaces": true,
"editor.fontFamily": "Fira Mono",
"editor.fontSize": 14,
"files.associations": {
"*.vue": "vue"
}
}
@djyde
djyde / keybindings.json
Created August 8, 2016 06:08
vscode keybinding
// 将键绑定放入此文件中以覆盖默认值
[
{
"key": "cmd+t",
"command": "workbench.action.quickOpen"
},
{
"key": "shift+cmd+t",
"command": "workbench.action.openPreviousEditor"
},