Skip to content

Instantly share code, notes, and snippets.

View chideat's full-sized avatar
🎰
Focusing

Seer chideat

🎰
Focusing
View GitHub Profile
@chideat
chideat / Arch Linux on a macbook.org
Created February 13, 2017 05:59 — forked from jhaubrich/Arch Linux on a macbook.org
Arch Linux on my MacBook 11,3

Arch Linux on a MacBookPro 11,3

Read The Arch Way, fall in.

Still Todo

I can’t believe how smoothly this went…

  • suspend - seems to work after installing gnome, pm-suspend works too… I have my eye on you. <.<
    • systemctl suspend works, but doesn’t wake properly.
  • power management
  • trackpad
@chideat
chideat / latency.txt
Created December 8, 2016 06:45 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers
--------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@chideat
chideat / 词性标记.md
Created December 15, 2015 09:27 — forked from luw2007/词性标记.md
词性标记: 包含 ICTPOS3.0词性标记集、ICTCLAS 汉语词性标注集、jieba 字典中出现的词性、simhash 中可以忽略的部分词性

词的分类

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

ICTPOS3.0词性标记集

n 名词

nr 人名

@chideat
chideat / ..build-protbuf-2.5.0.md
Created November 1, 2015 07:32 — forked from BennettSmith/..build-protbuf-2.5.0.md
Script used to build Google Protobuf 2.5.0 for use with Xcode 5 / iOS 7. Builds all supported architectures and produces a universal binary static library.

Google Protobuf 2.5.0 - Mac OS X and iOS Support

The script in this gist will help you buid the Google Protobuf library for use with Mac OS X and iOS. Other methods (such as homebrew or direct compilation) have issues that prevent their use. The libraries built by this script are universal and support all iOS device architectures including the simluator.

Get the Script

The easiest way to use this script is to simply clone the gist onto your

Generated private key

openssl genrsa -out server.key 2048

To generate a certificate

openssl req -new -x509 -key server.key -out server.pem -days 3650

https

@chideat
chideat / nginx.conf
Created October 29, 2015 07:36 — forked from micho/nginx.conf
nginx config for http/https proxy to localhost:3000
First, install nginx for mac with "brew install nginx".
Then follow homebrew's instructions to know where the config file is.
1. To use https you will need a self-signed certificate: https://devcenter.heroku.com/articles/ssl-certificate-self
2. Copy it somewhere (use full path in the example below for server.* files)
3. sudo nginx -s reload
4. Access https://localhost/
Edit /usr/local/etc/nginx/nginx.conf:
@chideat
chideat / README.md
Last active December 14, 2016 18:26 — forked from chuangbo/README.md

替换上你的Email,密码,域名ID,记录ID等参数,就可以运行了。 会在后台一直运行,每隔30秒检查一遍IP,如果修改了就更新IP。

获得domain_id可以用curl curl -k https://dnsapi.cn/Domain.List -d "login_email=xxx&login_password=xxx"

获得record_id类似 curl -k https://dnsapi.cn/Record.List -d "login_email=xxx&amp;login_password=xxx&amp;domain_id=xxx"

+(BOOL)isJailbroken{
#if !(TARGET_IPHONE_SIMULATOR)
if ([[NSFileManager defaultManager] fileExistsAtPath:@"/Applications/Cydia.app"]){
return YES;
}else if([[NSFileManager defaultManager] fileExistsAtPath:@"/Library/MobileSubstrate/MobileSubstrate.dylib"]){
return YES;
}else if([[NSFileManager defaultManager] fileExistsAtPath:@"/bin/bash"]){
return YES;
}else if([[NSFileManager defaultManager] fileExistsAtPath:@"/usr/sbin/sshd"]){
return YES;
@chideat
chideat / gist:5333310
Created April 8, 2013 00:34
How to install gitlab v5 on centos 5. all most is the same as the offical provide, execpet some details.

Overview

  1. Cent OS 5
  2. GitLab Shell
  3. Database
  4. Gitlab
  5. Nginx

1. Cent OS 5