Skip to content

Instantly share code, notes, and snippets.

Yao Adzaku rpip

Block or report user

Report or block rpip

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
rpip /
Last active Jan 21, 2018
pseudo implementation of the redux concept in Python
# events can be any structure, recommendation is to have a type keys
# to identify the event type and then add the payload keys
class DumpComponent:
# the views/models
# emit their own DOM, have own css styles
class SmartComponents:
rpip / arithmetic_protocol.ex
Last active Dec 10, 2015
Arithmetic protocol for Elixir
View arithmetic_protocol.ex
defprotocol Arithmetic.Add do
@moduledoc """
The Arithmetic.Add protocol is responsible for adding items.
The only function required to be implemented is
`__add__` which does the addition.
def __add__(left, right)
rpip /
Last active Aug 29, 2015 — forked from ndarville/
Business models based on the compiled list at I find the link very hard to browse, so I made a simple version in Markdown instead.

Business Models


Models Examples
Display ads Yahoo!
Search ads Google
rpip /
Last active Aug 29, 2015
Generate passwords for KeePass database. Output: (password, hash)
#!/usr/bin/env python
# USAGE: ./bin/passwd $password_prefix $dbpath $inventory_hostname -w
import sys, os
import string
import random
from datetime import datetime
from keepass import kpdb
from passlib.hash import sha256_crypt
rpip /
Last active Aug 29, 2015
my study notes ASM x86/i386

x86 / IA-32 registers

  • register is 32 bit wide

general registers

  1. eax - accumulator
  2. ebx - base
  3. ecx - counter
  4. edx - data
  5. esi - source index
rpip /
Last active Aug 29, 2015
Notes on learning Emacs

Notes on learning Emacs


C-x f => open file

C-x s => save file

C-x C-w => save to a new file



The new eDFS architecture is designed with the assumption that a single master system has a single point of failure. In a single-point-of-failure system, the failure of the master node will result in the termination of jobs and the loss of access to the entire system. This will not happen in a cluster where the master node is dynamically elected.

Therefore, each node in the cluster will be a self-containing full copy of eDFS. On startup, the system reads the cluster configuration and sets up the node cluster. All nodes start as followers; one node is elected to be a leader at the start. During normal operation, the leader maintains a heartbeat which allows the followers to detect if the leader fails or becomes partitioned.

View defstructplusplus.ex
defmodule DefStructPlusPlus do
@doc """
Macro for defining structs
## Examples
defmodule Models do
import DefStructPlusPlus
You can’t perform that action at this time.