Skip to content

Instantly share code, notes, and snippets.


Cẩm Huỳnh qcam

View GitHub Profile
qcam / time-extension-msgpack.rb
Created May 20, 2019
MessagePack Time extension unpacker in Ruby
View time-extension-msgpack.rb
require "msgpack"
class DateTimeExtension
def self.unpack(data)
case data.size
when 4
seconds = data.unpack("N")[0]
when 8
View g_counter.ex
defmodule GCounter.Node do
use GenServer
def start_link(node_name) do
GenServer.start_link(__MODULE__, node_name, [name: node_name])
@impl true
def init(node_name) do
init_counter = %{node_name => 0}
View feed_subscriptions.json
"source": "",
"url": "",
"category": "personal"
"source": "",
"url": "",
"category": "personal"
qcam / rfc822.ex
Last active Jul 19, 2018
nimble_parsec example with RFC822 datetime parser (
View rfc822.ex
defmodule RFC822 do
import NimbleParsec
day =
{"data":{"build-a-blog-in-elixir-with-nabo-and-phoenix":[{"content":"# g","created_at":"2019-01-14T08:18:53.347875Z","user":{"avatar_url":"","name":"Kalipts","provider":"github","provider_user_url":""}}],"chet-server-lam-gi-day":[{"content":"s","created_at":"2019-06-24T13:33:26.312600Z","user":{"avatar_url":"","name":"Juniorsz","provider":"github","provider_user_url":""}}],"chuyen-an-cap":[{"content":"Vậy nếu vi phạm Creative Commons License thì sẽ bị 'xử lý' như thế nào vậy anh?","created_at":"2018-04-22T14:40:23.413143Z","user":{"avatar_url":"","name":"j1nz","provider":"github","provider_user_url":""}},{"content":"[@j1nz]( Mình cũng chả muốn \"xử lý\" làm gì cả ☹️. Mình là developer, mình không phải luật sư. Mình chúc họ cắn rứt lương tâm vậy.","created
qcam / sample.xml
Last active Mar 20, 2018
Benchmarking XML parser in Erlang/Elixir
View sample.xml
<?xml version="1.0" encoding="UTF-8"?>
<name>Belgian Waffles</name>
<description>Two of our famous Belgian Waffles with plenty of real maple syrup</description>
<name>Strawberry Belgian Waffles</name>

Keybase proof

I hereby claim:

  • I am qcam on github.
  • I am qcam ( on keybase.
  • I have a public key whose fingerprint is 7EAD EE10 DB51 9180 986A 30B4 1BE7 CEA2 28E5 28A9

To claim this, I am signing this object:

qcam / hub
Last active Jan 25, 2017
Sample config file for hub
View hub
# Place your file in ~/.config/hub
- user: huynhquancam
oauth_token: XXX # personal token can be obtained from your Github > Settings > Security > Personal Token
qcam /
Last active Oct 16, 2016
My note for Functional Programming Principles in Scala course on Coursera -

Functional Programming

Week 1

Programming Paradigms

Main programming paradigms include:

Imperative Programming
qcam /
Last active Aug 30, 2016

What's gRPC?

In gRPC a client application can directly call methods on a server application on a different machine as if it was a local object, making it easier for you to create distributed applications and services. As in many RPC systems, gRPC is based around the idea of defining a service, specifying the methods that can be called remotely with their parameters and return types. On the server side, the server implements this interface and runs a gRPC server to handle client calls. On the client side, the client has a stub (referred to as just a client in some languages) that provides the same methods as the server.

gRPC clients and servers can communicate no matter what programming languages they're written in. For instance, you can easily create gRPC servers in C++ and clients in Ruby/Python.

Transport and Semantics

gRPC uses (Protocol Buffers, aka. Protobuf)(, for data serialization.