一对一关系:有 A 和 B,A 拥有且仅拥有一个 B
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Todo | |
class API < Grape::API | |
use Rack::Session::Cookie | |
version 'v1', :format => :json | |
helpers do | |
def current_user | |
return nil if env['rack.session'][:user_id].nil? | |
@current_user ||= User.get(env['rack.session'][:user_id]) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
INDEX | |
----- | |
- BUILD IT YOURSELF | |
- BUILD THE AUDIO SERVICE | |
- BUILDING FOR ANDROID | |
- INSTALL WITHOUT BUILDING | |
BUILD IT YOURSELF | |
----------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#apple | |
#nslookup -vc a1.phobos.apple.com 168.95.1.1 | |
#203.78.36.42 203.69.138.18 | |
#jp 120.29.145.9 124.40.51.32 61.213.183.25 | |
address=/a1.mzstatic.com/203.69.138.18 | |
address=/a2.mzstatic.com/203.69.138.18 | |
address=/a3.mzstatic.com/203.69.138.18 | |
address=/a4.mzstatic.com/203.69.138.18 | |
address=/a5.mzstatic.com/203.69.138.18 | |
address=/a6.mzstatic.com/203.69.138.18 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# git clone https://github.com/hexpm/hex.git | |
# cd hex | |
# git checkout v0.15.0 | |
# # Add this Dockerfile in the dir | |
# docker build . | |
# # Then you can use the image as your base image to speedup your usage | |
FROM elixir:1.5.2 | |
RUN HEX_MIRROR=https://hexpm.upyun.com mix local.rebar --force \ | |
# rebar3 update should be rerun if you add a new rebar dependence |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.random-color { | |
border-top-color: "LightCoral"; | |
border-right-color: #a44b58; | |
border-bottom-color: rgb(108, 188, 134); | |
border-left-color: rgb(24%, 88%, 5%); | |
outline-top-color: hsl(88, 69%, 69%); | |
outline-right-color: rgba(220, 71, 132, 0.69); | |
outline-bottom-color: rgba(79%, 47%, 14%, 0.37); | |
outline-left-color: hsla(111, 31%, 38%, 0.86); | |
} |
Install Python
$ brew install readline sqlite gdbm
$ brew install python --universal --framework
$ python --version
Python 2.7
Symlinks...
Tencent (腾讯):
- http://isux.tencent.com/ (Internet Social User Experience/社交用户体验设计部)
- http://cdc.tencent.com/ (Customer Research & User Experience Design Center/即用户研究与体验设计中心)
- (已死) http://isd.tencent.com/ (Design Team for Internet Service Division/即用户研究与体验设计中心)
- (已死) http://wsd.tencent.com/
- (已死) http://flashteam.tencent.com/
- http://tgideas.qq.com/
- (已死) http://gdc.qq.com/
- (已死) http://ecd.tencent.com/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export MPD_HOST="localhost" | |
export MPD_PORT="6601" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import os | |
import struct | |
from mutagen.easyid3 import EasyID3 | |
def decode_gbk_from_unicode(s): | |
l, f = [], [] |