Skip to content

Instantly share code, notes, and snippets.

View tuananh's full-sized avatar
☁️
Head of Tech Platform @ VPBank. AWS Community Builder

Tuan Anh Tran tuananh

☁️
Head of Tech Platform @ VPBank. AWS Community Builder
View GitHub Profile

GoQuo Vietnam Interview Round 1

Giải thích thuật toán của bạn 1 cách ngắn gọn và upload code lên github/gitlab (tùy chọn).

Ghi chú cách chạy code của bạn. Bài kiếm tra có thể sử dụng bất kì ngôn ngữ nào (C#/Java,JavaScript,...).

Bạn có thể chỉ gửi những câu bạn làm được. Nếu làm được toàn bộ thì tốt nhất.

Nếu không code hoàn chỉnh được, bạn có thể ghi cách bạn nghĩ bạn muốn làm và nó có thể hoạt động được.

---
title: Link Post in Jekyll
layout: default
link: http://example.com
---
{% if page.link %}
<h1><a href="{{ page.link }}">{{ page.title }}</a></h1>
{% else %}
<h1><a href="{{ page.url }}">{{ page.title }}</a></h1>
{% endif %}
rm ~/Desktop/out.txt
for f in "$@"
do
/usr/local/Cellar/tesseract/3.02.02/bin/tesseract "$f" "$f"
cat "$f.txt" >> ~/Desktop/out.txt
rm "$f" "$f.txt"
done
  • Install Homebrew

  • Install cabextract

  • Use cabextract to extract Consolas font

  • Install

cd /var/www/discouse/plugins
# git clone the plugin you want to install
sudo /home/discourse/.rbenv/shims/bundle exec rake db:migrate /var/www/discourse RAILS_ENV=production
sudo /home/discourse/.rbenv/shims/bundle exec rake assets:precompile /var/www/discourse RAILS_ENV=production
sudo systemctl reload discourse-unicorn.service
{
"GTA": {
"requestId": "746d402d33a246b6b90f55b3819825b7",
"hotelSummary": [
{
"provider": "GTA",
"hotelId": "NEW",
"expediaId": "",
"hotelInfo": {
"name": "Renaissance",
### Keybase proof
I hereby claim:
* I am tuananh on github.
* I am tuananh (https://keybase.io/tuananh) on keybase.
* I have a public key whose fingerprint is 2099 6776 68B4 B40D 7406 51C6 EC28 5543 307D D8D6
To claim this, I am signing this object:
@tuananh
tuananh / 00_copy_key.lua
Created January 3, 2017 03:56 — forked from itamarhaber/00_copy_key.lua
The fastest, type-agnostic way to copy a Redis key, as discussed in https://redislabs.com/blog/the-7th-principle-of-redis-we-optimize-for-joy
-- @desc: The fastest, type-agnostic way to copy a Redis key
-- @usage: redis-cli --eval copy_key.lua <source> <dest> , [NX]
local s = KEYS[1]
local d = KEYS[2]
if redis.call("EXISTS", d) == 1 then
if type(ARGV[1]) == "string" and ARGV[1]:upper() == "NX" then
return nil
else
@tuananh
tuananh / fedora.md
Created January 4, 2017 12:35 — forked from olpoco/fedora.md
Installing Fedora 23 on Macbook Pro Retina 2016, and attaching Airport Extreme

Installing Fedora on Macbook Pro retina

  1. Download Fedora 23 iso, create a usb bootable media Follow instructions here Basically,
  2. use diskutil list to figure out which drive is the usb, on macbook pro with 1 hardrive, the usb is /dev/disk2
  3. umount the disk using diskutil unmountDisk /dev/disk2 or use Mac's Disk Utility (just umount, don't eject, umount removes it from directory structure and eject disconncet it altogether)
  4. use dd(a low level cp) to write iso content into the usb drive, sudo dd if=~/Downloads/Fedora-Live-Desktop-x86_64-20-1.iso of=/dev/disk2 bs=1m, this will take a bit of time, make sure you wait until it's done, additionally compare the size or checksum to make sure all has been copied (not that necessary since if it weren't copied, it'll err at boot time)
  5. use Disk Utility to shrink Mac's harddrive