Navigation Menu

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
---
title: Link Post in Jekyll
layout: default
link: http://example.com
---
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
@tuananh
tuananh / archive.html
Created November 12, 2013 15:16
Group posts by month in Jekyll archive page
---
layout: default
title: Archive
---
<div class="post">
<h2>Archive</h2>
<ul>
{% for post in site.posts %}
{% unless post.next %}
---
layout: nil
---
{% include css/file1.css %}
{% include css/file2.css %}

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.

  • 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",
@tuananh
tuananh / convert-pfx-ssl-certificate-to-crt-key-pem-formats.md
Created April 27, 2016 06:29
How to convert a .pfx SSL certificate to .crt/key (pem) formats

source: http://www.markbrilman.nl/2011/08/howto-convert-a-pfx-to-a-seperate-key-crt-file/

openssl pkcs12 -in [yourfile.pfx] -nocerts -out [keyfile-encrypted.key]

What this command does is extract the private key from the .pfx file. Once entered you need to type in the importpassword of the .pfx file. This is the password that you used to protect your keypair when you created your .pfx file. If you cannot remember it anymore you can just throw your .pfx file away, cause you won’t be able to import it again, anywhere!. Once you entered the import password OpenSSL requests you to type in another password, twice!. This new password will protect your .key file.

Now let’s extract the certificate:

openssl pkcs12 -in [yourfile.pfx] -clcerts -nokeys -out [certificate.crt]

### 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: