Thứ Tư, 3 tháng 7, 2019

Guitar ký sự

Ghi chú:
-: nghỉ 

  • Slow Surf

Rải: B 3 21 3
Quạt: XUỐNG - XUỐNG XUỐNG LÊN

  • Fast Surf
Rải: B 3 2 3 1 3 2 3
Quạt: XUỐNG - XUỐNG LÊN - LÊN XUỐNG LÊN

  • Ballad

XUỐNG - - - XUỐNG - - LÊN - LÊN XUỐNG - XUỐNG LÊN XUỐNG LÊN

  • Disco

XUỐNG LÊN CHẶT LÊN - LÊN CHẶT LÊN

  • Blue
Rải:  B 32 B 21
B 321 ĐẬP B321 - 321 ĐẬP B

Thứ Sáu, 21 tháng 6, 2019

Cypress Gathering

 
  • Read a file that maybe not exist
https://docs.cypress.io/api/commands/task.html#Read-a-file-that-might-not-exist


  • Add timeout when checking for element


cy.get('.selector', {timeout: 5000});


  • Wait to be redirected to new location


cy.url({timeout: 15000}).should('contain', '/new-location');


Cách truyền tham số có tên (named arguments) khi chạy file .bat (Windows)


Việc sử dụng tham số có tên thay vì tham số thứ tự tăng tính trực quan, dễ sử dụng cho các tool thực thi, trải dài từ các script bash, Python, Node.js và cả Windows .bat

Với ví dụ, để truyền hai tham số EMAIL và PASSWORD vào .bat script, từ Command Prompt (CMD) ta chạy như sau

run-tool.bat "EMAIL=sample@gmail.com" "PASSWORD=secret"

Nội dung của run-tool.bat:

set EMAIL=
set PASSWORD=

set %1
set %2

echo EMAIL: %EMAIL%
echo PASSWORD: %PASSWORD%

Giải thích:

set %1
set %2

Khi chạy run-tool.bat "EMAIL=sample@gmail.com" "PASSWORD=secret"

%1 do bat hỗ trợ đọc được sẽ là "EMAIL=sample@gmail.com"
set %1 tương đương set "EMAIL=sample@gmail.com"
Tức là set biến môi trường EMAIL với giá trị sample@gmail.com.
Lúc đó ta truy cập được giá trị (echo %EMAIL%)

Tương tự với PASSWORD thông qua %2

2 câu set tham số về rỗng nhằm đảm bảo mỗi lần chạy script giá trị hiện tại của biến được xóa sạch đi.
set EMAIL=
set PASSWORD= 

Như vậy bằng cách dùng set, tận dụng %1, %2, %3... ta có thể để nó set giá trị các biến môi trường và tool có thể bắt đầu sử dụng chúng.

Bài viết được viết theo trải nghiệm và tham khảo chính từ Stackoverflow

Dòng sông Seine và một số bài hát được nhắc đến

 
  • Mùa Thu Không Trở Lại (Phạm Trọng Cầu)
Nghe rơi bao lá vàng
Ngập dòng nước sông Seine
Mưa rơi trên phím đàn
Chừng nào cho tôi quên

  • Nhạt Nhòa (Tuấn Khanh)
Em, tại sao em lại tiếc nuối
Ôi đường đèn giòng sông SEINE
Chứng cuộc tình chúng mình


  • Bài Thơ Không Đoạn Kết (Lam Phương)
...
Một cuộc tình tan giữa sông Seine   
...

  • Paris Có Gì Lạ Không Em (Ngô Thụy Miên) 
Paris có gì lạ không em?
Mai anh về giữa bến sông Seine
Anh về giữa một giòng sông trắng
Là áo sương mù hay áo em?

Thứ Hai, 27 tháng 5, 2019

Tăng tốc mysqldump

Nên dùng Schema Inspector để biết được kích thước của từng bảng trong CSDL. Sau đó chạy mysqldump riêng rẽ dump ra từng bảng, pipe output qua nén gzip để giảm thiểu kích thước.

mysqldump -u <username> -p <database_name> <target_table> | gzip > ~/<target_table.gzip>

Dump tất cả các bảng ngoại trừ một số bảng:

mysqldump -u <username> -p <database_name> --ignore-table=<db_name.table_name> --ignore-table=<db_name.other_table_name> ... | gzip > ~/remaining_tables.gzip

Tham khảo thêm:  https://stackoverflow.com/questions/425158/skip-certain-tables-with-mysqldump

Thứ Hai, 20 tháng 5, 2019

Speak English Professionally: -ed and -s endings




VOICED & VOICELESS
Sounds with vocal chord vibration are voiced and sounds without vocal chord vibration are voiceless.

Contrast the sounds of the letters v and f. Place your fingers on your throat and make the sounds. You should feel a vibration when you make the v sound and no vibration when you make the f sound. V is voiced and f is voiceless.

  • The Voiced Sounds in English
b d g j l m n ŋ(ng) r v z ð(th in the) and all vowels
  • The Voiceless Sounds in English
ch f h k p s sh t θ(th in think)

Ref: eflnet.com



-ED ENDINGS

  • /id/ after /t/ or /d/
invited
educated
waited
landed
handed
located
predicted

  • /t/ after voiceless sounds

laughed
locked
looked
finished
crashed
picked
embarrassed

  • /d/ after voiced sounds
worried
called
turned
prepared
rearranged
played

-S ENDINGS

  • /s/ after voiceless sounds (except /s/, /ʃ/, /ʧ/)
compliments
hopes
meets
laughs
months
writes
parents


  • /z/ after voiced sounds (except /z/, /ʒ/, /ʤ/)
clothes  (th - ð)
magazines
saves
feels
drives
friends
feathers
  • /iz/ 
raises
horses
finishes
changes
rises
taxes
washes
dishes
kisses


Source: 

Thứ Hai, 13 tháng 5, 2019

Speak English Professionally: Group Discussion Language (agree/disagree, clarify, interrupt/take a turn, include others)

Image result for group discussion

Ways to agree:
  • Yes, I agree.
  • It looks good to me.
  • I think so, too.
  • I definitely agree.

Ways to disagree:
We want show different levels of disagreement (positive, little or very serious).

  • I'm afraid I don't agree.
  • I'm sorry, but I don't agree.
  • That's interesting. But I'd prefer something different.
  • Actually, I disagree

Ways to clarify info:
Sometimes you missed the info or you didn't really understand or didn't hear clearly... So you can ask to clarify the information.
  • Excuse me, I didn't hear that. Could you say it again?
  • Sorry, I missed what you just said. Could you repeat that please?
  • I'm sorry, could you explain that again?
  • Excuse me, could you tell me what that means?
Ways to take a turn/interrupt:
  • Excuse me. Can I say something here?
  • Could I interrupt you for a minute?
  • Sorry to interrupt, but I'd like to say something here.
 Ways to include others:
  • So what do you think?
  • Can you give me your thoughts on this?
  • Do you agree?
  • What's your opinion?

Recap:
We can mix these above languages and use it for your better group discussions.

Reference: Cousera