Skip to content

Instantly share code, notes, and snippets.

View fengkiej's full-sized avatar

Fengkie Junis fengkiej

View GitHub Profile
@fengkiej
fengkiej / GitCommitEmoji.md
Created December 1, 2020 10:38 — forked from parmentf/GitCommitEmoji.md
Git Commit message Emoji
This file has been truncated, but you can view the full file.
loading candles...
CANDLES |
----------------------+--------------------------
period | 152 days (5.07 months)
starting-ending date | 2020-01-01 => 2020-06-01
exchange | symbol | timeframe | strategy | DNA
------------+----------+-------------+--------------------+-------
Bitfinex | BTCUSD | 3h | TimeSeriesMomentum |
@fengkiej
fengkiej / Address.sol
Created September 24, 2019 02:48
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.5.11+commit.c082d0b4.js&optimize=false&gist=
pragma solidity ^0.5.0;
/**
* Utility library of inline functions on addresses
*/
library Address {
/**
* Returns whether the target address is a contract
* @dev This function will return false if invoked during the constructor of a contract,
* as the code is not actually created until after the constructor finishes.
@fengkiej
fengkiej / CertificationContract.sol
Created July 29, 2019 12:39
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.5.2+commit.1df8f40c.js&optimize=false&gist=
pragma solidity ^0.5.0;
pragma experimental ABIEncoderV2;
//self sign
import "./ConsensusContract.sol";
contract CertificationContract {
enum CertificationType {
NONE, N2A, A2A, A2U
}
enum AccountType {
@fengkiej
fengkiej / CertificationContract.sol
Created July 29, 2019 11:26
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.5.1+commit.c8a2cb62.js&optimize=false&gist=
pragma solidity ^0.5.0;
pragma experimental ABIEncoderV2;
import "./ConsensusContract.sol";
contract CertificationContract {
enum CertificationType {
NONE, N2A, A2A, A2U
}
enum AccountType {
@fengkiej
fengkiej / CertificationContract.sol
Created July 28, 2019 21:16
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.5.1+commit.c8a2cb62.js&optimize=false&gist=
pragma solidity ^0.5.0;
pragma experimental ABIEncoderV2;
import "./ConsensusContract.sol";
contract CertificationContract {
enum CertificationType {
NONE, N2A, A2A, A2U
}
enum AccountType {
@fengkiej
fengkiej / Address.sol
Created June 21, 2019 15:18
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=undefined&optimize=false&gist=
pragma solidity ^0.5.0;
/**
* Utility library of inline functions on addresses
*/
library Address {
/**
* Returns whether the target address is a contract
* @dev This function will return false if invoked during the constructor of a contract,
* as the code is not actually created until after the constructor finishes.
@fengkiej
fengkiej / Address.sol
Created April 7, 2019 19:54
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.5.7+commit.6da8b019.js&optimize=true&gist=
pragma solidity ^0.5.0;
/**
* Utility library of inline functions on addresses
*/
library Address {
/**
* Returns whether the target address is a contract
pragma solidity ^0.4.15;
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/
contract Ownable {
address public owner;
@fengkiej
fengkiej / PolyAlphabeticCipher.hs
Last active September 14, 2016 02:00
Implementation of poly-alphabetic cipher in Haskell programming language.
module PolyCipher where
import Data.Char
startingLetter letter |isUpper letter = ord 'A'
|isLower letter = ord 'a'
|otherwise = ord ' '
polyEncrypt :: String -> String -> String
polyEncrypt plainText keyText = zipWith (shift) plainText (cycle (toNum keyText))