Skip to content

Instantly share code, notes, and snippets.

View hysios's full-sized avatar
🎯
Focusing

hysios hysios

🎯
Focusing
View GitHub Profile
@hysios
hysios / sketch-never-ending.md
Created May 31, 2018 02:36 — forked from Bhavdip/sketch-never-ending.md
Modify Sketch to never ending trial

###Sketch trial non stop

Open hosts files:

$ open /private/etc/hosts

Edit the file adding:

127.0.0.1 backend.bohemiancoding.com

127.0.0.1 bohemiancoding.sketch.analytics.s3-website-us-east-1.amazonaws.com

# HOSTNAME=${1:-k8smaster} # If variable not set or null, set it to default.
DNS_SERVER=8.8.8.8
PROXY=${2:-http://your.proxyip}
# hostname $HOSTNAME
# hostname -F /etc/hostname
sudo yum remove -y docker \
docker-client \
docker-client-latest \
@hysios
hysios / 词性标记.md
Created March 11, 2018 10:27 — forked from luw2007/词性标记.md
词性标记: 包含 ICTPOS3.0词性标记集、ICTCLAS 汉语词性标注集、jieba 字典中出现的词性、simhash 中可以忽略的部分词性

词的分类

  • 实词:名词、动词、形容词、状态词、区别词、数词、量词、代词
  • 虚词:副词、介词、连词、助词、拟声词、叹词。

ICTPOS3.0词性标记集

n 名词

nr 人名

# 1. 排序去除重复
cat customers.txt|sort | uniq > cc.txt
# 2. 转换成拼音码文件
echo > cc_py.txt
while read p; do
pypinyin $p -s TONE2 >> cc_py.txt
done <cc.txt
FILENAME=test.aiff
record-amd64 $FILENAME
ffmpeg -y -i $FILENAME -ar 16000 test.wav
@hysios
hysios / convert_bgm_to_m4a.sh
Last active January 12, 2017 06:10
将所有背景音乐转换成 底 bit 的音轨
for f in *.aac; do ffmpeg -y -i $f -c:a libfdk_aac -b:a 32k -ac 1 $(basename $f .aac).m4a; done
@hysios
hysios / index-array.js
Last active August 29, 2015 14:06
ember highlight a item in menu
/* lib/index-array.js */
App.IndexArray = Ember.ArrayController.extend({
_indexName: 'index',
_isVirtual: true,
/**
* initializer function
*
* @param [Array] array proxy target object
import Ember from 'ember';
var get = Ember.get;
export default Ember.Component.extend({
didInsertElement: function(){
Ember.$(document).bind('click', this.closeThis);
},
closeThis: function(event) {
@hysios
hysios / path-distance.rb
Last active August 29, 2015 14:01
path-distance 1
def distance_between v,w
dist = 0
adj[v].each do |e|
dist = e.weight if e.to == w
end
return dist
end
#receive a path str like "A-B-C", return length of that path
def path_distance str
@hysios
hysios / sprites.js
Created October 15, 2013 07:00
sprites server
// includes
var cluster = require('cluster');
var cpuCount = require('os').cpus().length;
var util = require("util");
var http = require("http");
var url = require('url');
var fs = require('fs');
// max number of connections
var MAX_CONNECTIONS = 1000000;