Skip to content

Instantly share code, notes, and snippets.

View erichua23's full-sized avatar
🎯
Focusing

EricHua23 erichua23

🎯
Focusing
View GitHub Profile
@erichua23
erichua23 / group.js
Created August 7, 2017 08:53
桌上足球分组
const md5=require('md5')
let teamList = []
require('csvtojson')().fromFile('./team_list.csv').on('json', team => {
teamList.push(team)
}).on('done', error => {
teamList.forEach(item => {
item.md5 = md5(item.create_at + item.end_at + item.team_name + item.member1 + item.member2)
})
teamList.sort((item1, item2) => {
return item1.md5 <= item2.md5 ? -1 : 1
@erichua23
erichua23 / group.js
Created August 7, 2017 08:53
桌上足球分组
const md5=require('md5')
let teamList = []
require('csvtojson')().fromFile('./team_list.csv').on('json', team => {
teamList.push(team)
}).on('done', error => {
teamList.forEach(item => {
item.md5 = md5(item.create_at + item.end_at + item.team_name + item.member1 + item.member2)
})
teamList.sort((item1, item2) => {
return item1.md5 <= item2.md5 ? -1 : 1
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="false"
android:color="@color/flat_disabled_text"/>
<item android:color="@color/flat_normal_text"/>
</selector>
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="red_50">#fde0dc</color>
<color name="red_100">#f9bdbb</color>
<color name="red_200">#f69988</color>
<color name="red_300">#f36c60</color>
<color name="red_400">#e84e40</color>
<color name="red_500">#e51c23</color>
<color name="red_600">#dd191d</color>
<color name="red_700">#d01716</color>
@erichua23
erichua23 / 0_reuse_code.js
Last active August 29, 2015 14:24
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@erichua23
erichua23 / chatServer.js
Created June 29, 2014 13:08 — forked from creationix/chatServer.js
chatServer.js
// Load the TCP Library
net = require('net');
// Keep track of the chat clients
var clients = [];
// Start a TCP Server
net.createServer(function (socket) {
// Identify this client