Git 更換遠端伺服器倉庫網址URL
1.確認目前Git遠端伺服器網址: git remote -v
git remote -v
origin https://github.com/USERNAME/REPOSITORY.git (fetch)
origin https://github.com/USERNAME/REPOSITORY.git (push)
2.更換Git遠端伺服器位網址,使用:git remote set-url
Git 更換遠端伺服器倉庫網址URL
1.確認目前Git遠端伺服器網址: git remote -v
git remote -v
origin https://github.com/USERNAME/REPOSITORY.git (fetch)
origin https://github.com/USERNAME/REPOSITORY.git (push)
2.更換Git遠端伺服器位網址,使用:git remote set-url
@版本 2.0.0
譯注:此翻譯版,主要給不能流利的讀英文的人看,相關專有名詞還是保留原文。翻譯不好地方請協助pull request.
此repository包含了一些前端開發的面試問題,來審查一個有潛力的面試者。這並不是建議你對同一個面試者問上所有的問 (那會花費好幾小時)。從列表中挑幾個題目,應該就夠幫助你審查面試者是否擁有你需要的技能。
Rebecca Murphey 的 Baseline For Front-End Developers 也是一篇很棒且值得讀的文章在你開始面試之前。
// Arrow functions | |
// spec: http://bit.ly/KN3z1c | |
// with lexical this | |
var square = function(x) { return x * x } | |
var square = x => { return x * x } |
<?php | |
class CalendarEvent { | |
/** | |
* | |
* The event ID | |
* @var string | |
*/ | |
private $uid; |
<?php | |
function get_ip_address() { | |
$ip_keys = array('HTTP_CLIENT_IP', 'HTTP_X_FORWARDED_FOR', 'HTTP_X_FORWARDED', 'HTTP_X_CLUSTER_CLIENT_IP', 'HTTP_FORWARDED_FOR', 'HTTP_FORWARDED', 'REMOTE_ADDR'); | |
foreach ($ip_keys as $key) { | |
if (array_key_exists($key, $_SERVER) === true) { | |
foreach (explode(',', $_SERVER[$key]) as $ip) { | |
// trim for safety measures | |
$ip = trim($ip); | |
// attempt to validate IP | |
if (validate_ip($ip)) { |
require 'rest_client' | |
require 'json' | |
a = `sox -d --norm -t .flac - silence -l 1 0 1% 1 6.0 1% rate 16k` | |
#a = `arecord -q -d 3 -c 1 -f S16_LE -r 22050 -t wav | flac - -f --totally-silent -o-` | |
r = RestClient.post 'https://www.google.com/speech-api/v1/recognize?lang=en-US', a, | |
:content_type => 'audio/x-flac; rate=16000' | |
if j = JSON.parse(r) | |
(p j; `espeak 'you said: #{j['hypotheses'].first['utterance']}'`) | |
end |
# Rhino (Java required) | |
curl ftp://ftp.mozilla.org/pub/mozilla.org/js/rhino1_7R3.zip > ./rhino.zip | |
unzip rhino.zip | |
mkdir -p ~/Library/Java/Extensions | |
cp -p rhino1_7R3/js.jar ~/Library/Java/Extensions/ | |
rm -rf rhino.zip ./rhino1_7R3 | |
# -- chekcing installed | |
# java org.mozilla.javascript.tools.shell.Main |