- 不會太污染
PATH
- 盡可能避免要求 root/admin 權限
- 可以同時安裝多個版本(只需要到 minor,不須 patch)
- 可以輕鬆啟動任意一個版本的 Python,不須多餘設定,版本之間也不會互相衝突
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 node | |
var fs = require('fs'); | |
var path = require('path'); | |
require('shelljs/global'); | |
fs.watch('client', {recursive: true}, function(event, filename) { | |
exec('mocha -t 5000 --harmony --growl ' + | |
'test/test.' + path.basename(filename)); |
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
@import Foundation; | |
@interface KKWatchAppNotificationCenter : NSObject | |
+ (instancetype)sharedCenter; | |
- (void)postNotification:(NSString *)key; | |
- (void)addTarget:(id)target selector:(SEL)selector name:(NSString *)notification; | |
- (void)removeObserver:(NSObject *)observer; | |
@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
#!/bin/bash | |
# xcode command tool | |
xcode-select --install | |
# check | |
xcode-select -p | |
# homebrew | |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" |
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
package com.deviant.security.shield; | |
public final class BuildConfig { | |
public static final String BUILD_TYPE = "debug"; | |
public static final boolean DEBUG; | |
public static final String FLAVOR = ""; | |
public static final String PACKAGE_NAME = "com.deviant.security.shield"; | |
public static final int VERSION_CODE = 4; | |
public static final String VERSION_NAME = "2.2"; |
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
@interface AppDelegate : NSObject <NSApplicationDelegate, NSOutlineViewDataSource, NSOutlineViewDelegate> | |
@end | |
@implementation AppDelegate { | |
NSWindow *_w; | |
NSDictionary *_data; | |
} |
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
[difftool "Kaleidoscope"] | |
cmd = ksdiff --partial-changeset --relative-path \"$MERGED\" -- \"$LOCAL\" \"$REMOTE\" | |
[diff] | |
tool = Kaleidoscope | |
[difftool] | |
prompt = false | |
[mergetool "Kaleidoscope"] | |
cmd = ksdiff --merge --output \"$MERGED\" --base \"$BASE\" -- \"$LOCAL\" --snapshot \"$REMOTE\" --snapshot | |
trustExitCode = true | |
[mergetool] |
@版本 2.0.0
譯注:此翻譯版,主要給不能流利的讀英文的人看,相關專有名詞還是保留原文。翻譯不好地方請協助pull request.
此repository包含了一些前端開發的面試問題,來審查一個有潛力的面試者。這並不是建議你對同一個面試者問上所有的問 (那會花費好幾小時)。從列表中挑幾個題目,應該就夠幫助你審查面試者是否擁有你需要的技能。
Rebecca Murphey 的 Baseline For Front-End Developers 也是一篇很棒且值得讀的文章在你開始面試之前。
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
import cv2.cv as cv | |
import tesseract | |
gray = cv.LoadImage('captcha.jpeg', cv.CV_LOAD_IMAGE_GRAYSCALE) | |
cv.Threshold(gray, gray, 231, 255, cv.CV_THRESH_BINARY) | |
api = tesseract.TessBaseAPI() | |
api.Init(".","eng",tesseract.OEM_DEFAULT) | |
api.SetVariable("tessedit_char_whitelist", "0123456789abcdefghijklmnopqrstuvwxyz") | |
api.SetPageSegMode(tesseract.PSM_SINGLE_WORD) | |
tesseract.SetCvImage(gray,api) | |
print api.GetUTF8Text() |
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
[[NSLocale availableLocaleIdentifiers] enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) { | |
NSLocale *locale = [[NSLocale alloc] initWithLocaleIdentifier:obj]; | |
NSLog(@"<tr><td>%@</td><td>%@ / %@</td></tr>", locale.localeIdentifier, [[NSLocale systemLocale] displayNameForKey:NSLocaleIdentifier value:obj], [locale displayNameForKey:NSLocaleIdentifier value:obj]); | |
}]; |
NewerOlder