create different ssh key according the article Mac Set-Up Git
ssh-keygen -t ed25519 -C "[email protected]"
create different ssh key according the article Mac Set-Up Git
ssh-keygen -t ed25519 -C "[email protected]"
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
llet mockDelay; | |
let mockError; | |
let mockResponse = { | |
get: jest.fn(), | |
ok: true, | |
status: 200, | |
toError: jest.fn(), | |
}; | |
let mockResponseBodies; |
{ | |
"presets": ["es2015"], | |
"plugins": ["transform-async-to-generator"] | |
} |
L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns
Compress 1K bytes with Zippy ............. 3,000 ns = 3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns = 20 µs
SSD random read ........................ 150,000 ns = 150 µs
Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |
module Where | |
class <<self | |
attr_accessor :editor | |
def is_proc(proc) | |
source_location(proc) | |
end | |
def is_method(klass, method_name) | |
source_location(klass.method(method_name)) |
require 'net/ftp' | |
CONTENT_SERVER_DOMAIN_NAME = "one-of-the-ftp-server.thought-sauce.com.hk" | |
CONTENT_SERVER_FTP_LOGIN = "saucy-ftp-server-login" | |
CONTENT_SERVER_FTP_PASSWORD = "saucy-ftp-server-password" | |
# LOGIN and LIST available files at default home directory | |
Net::FTP.open(CONTENT_SERVER_DOMAIN_NAME, CONTENT_SERVER_FTP_LOGIN, CONTENT_SERVER_FTP_PASSWORD) do |ftp| | |
files = ftp.list |
ActionView::Base.field_error_proc = Proc.new do |html_tag, instance| | |
html = %(<div class="error">#{html_tag}) | |
html += %(<small>#{instance.error_message.to_a.to_sentence}</small>).html_safe unless html_tag =~ /^<label/ | |
html += %(</div>) | |
html.html_safe | |
end |