Skip to content

Instantly share code, notes, and snippets.

View ngocbd's full-sized avatar
🎯
Focusing

Bui Dinh Ngoc ngocbd

🎯
Focusing
View GitHub Profile
———————————————————————————————
Dưới đây là một số link kháng nghị cho các bạn tham khảo nha
– Chát với suport :
https://www.facebook.com/business/form/chat?hc_location=ufi
– Gửi kiến nghị cho facebook
www.facebook.com/help/127103474099499
– Đổi tên người dùng (URL) cho page:
https://www.facebook.com/help/contact/426864384041925
@ngocbd
ngocbd / MerkleTree.v
Created November 2, 2022 06:31
sha512 MerkleTree implement in V
module core
import crypto.sha512
struct MerkleNode{
pub mut : hash string
left &MerkleNode
right &MerkleNode
}
pub fn (mut node MerkleNode) hash() string {
node.hash = sha512.hexhash(node.left.hash + node.right.hash)
return node.hash
@ngocbd
ngocbd / transaction.v
Created November 2, 2022 06:30
blockchain transaction in v
module core
import crypto.sha512
import crypto.ed25519
import encoding.hex
pub struct Transaction {
mut: hash string
sender string
recipient string
amount int
@ngocbd
ngocbd / gist:860c8d7b977477568cfceaa82216bea8
Created November 2, 2022 06:29
ed25519 Account blockchain
module core
import crypto.ed25519
import encoding.hex
pub struct Account {
pub : balance u64
nonce u64
public_key string
private_key string
}
#include <ESP8266WiFi.h>
#include <ESP8266WiFi.h>
#ifndef STASSID
#define STASSID "HUAWEI-AnqK"
#define STAPSK "KKXY244m"
#endif
/* YourDuino.com Example Software Sketch
20 character 4 line I2C Display
Backpack Interface labelled "YwRobot Arduino LCM1602 IIC V1"
Connect Vcc and Ground, SDA to A4, SCL to A5 on Arduino
terry@yourduino.com */
/*-----( Import needed libraries )-----*/
#include <Wire.h> // Comes with Arduino IDE
// Get the LCD I2C Library here:
// https://bitbucket.org/fmalpartida/new-liquidcrystal/downloads
/****************************************************************************
Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.
http://www.cocos2d-x.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
String[] commentRepo = {
"Bài nói của bạn rất hay %s. Mình đã đăng bài viết của bạn tại https://cec.net.vn/p/%s/",
"%s bài nói của bạn rất hay. Mình đã đăng bài viết của bạn tại https://cec.net.vn/p/%s/",
"%s bài nói của bạn rất tuyệt vời. Mình đã đăng bài viết của bạn tại https://cec.net.vn/p/%s/",
"%s mình tự hào về bạn. Mình đã đăng bài viết của bạn tại https://cec.net.vn/p/%s/",
"%s ước gì mình nói được như bạn bạn. Mình đã đăng bài viết của bạn tại https://cec.net.vn/p/%s/",
"Mình tự hào về bạn. %s mình đã đăng bài viết của bạn tại https://cec.net.vn/p/%s/",
"%s thần tượng của mình đây rồi, mình đã đăng bài viết của bạn tại https://cec.net.vn/p/%s/",
"%s quá hay mình đã đăng bài viết của bạn tại https://cec.net.vn/p/%s/",
"%s Quá tuyệt mình đã đăng bài viết của bạn tại https://cec.net.vn/p/%s/",
@ngocbd
ngocbd / keybase.md
Created August 15, 2018 10:50
keybase.md

Keybase proof

I hereby claim:

  • I am ngocbd on github.
  • I am ngocbd (https://keybase.io/ngocbd) on keybase.
  • I have a public key whose fingerprint is FC62 4803 725D 27A9 FD42 81F7 B7C1 D5E9 2D16 B4F4

To claim this, I am signing this object:

@ngocbd
ngocbd / gist:b0abec02959dc1ac9463c7624509dbf9
Created June 14, 2018 03:40
call smartcontract by web3js
// Dependencies
var Web3 = require('web3');
var Tx = require('ethereumjs-tx');
var _ = require('lodash');
var SolidityFunction = require('web3/lib/web3/function');
var keythereum = require("keythereum");
// Initialize connection
var web3 = new Web3();
web3.setProvider(new web3.providers.HttpProvider("http://localhost:8545"));