Skip to content

Instantly share code, notes, and snippets.

View phuctu1901's full-sized avatar
🎯
Focusing for learn more...

Nguyễn Phúc Tú phuctu1901

🎯
Focusing for learn more...
View GitHub Profile
#include "stdio.h"
#include "stdlib.h"
struct NODE
{
int Data;
struct NODE *left, *right;
};
typedef struct NODE *NODEPTR;
@phuctu1901
phuctu1901 / VehicleManagement.sol
Last active August 13, 2018 01:25
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.4.24+commit.e67f0147.js&optimize=false&gist=
pragma solidity ^0.4.21;
contract Vehicles{
struct Person {
address owner;
string yearOfRegis;
string etag_id;
}
@phuctu1901
phuctu1901 / AnonymouseVoting.sol
Created August 13, 2018 02: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.4.24+commit.e67f0147.js&optimize=false&gist=
pragma solidity ^0.4.3;
/**
* @title ECCMath
*
* Functions for working with integers, curve-points, etc.
*
* @author Andreas Olofsson (androlo1980@gmail.com)
*/
library ECCMath {
@phuctu1901
phuctu1901 / AnonymouseVoting.sol
Created August 13, 2018 04:07
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.4.24+commit.e67f0147.js&optimize=false&gist=
pragma solidity ^0.4.3;
/**
* @title ECCMath
*
* Functions for working with integers, curve-points, etc.
*
* @author Andreas Olofsson (androlo1980@gmail.com)
*/
library ECCMath {
@phuctu1901
phuctu1901 / AccessVariable.sol
Created August 13, 2018 09:01
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.4.24+commit.e67f0147.js&optimize=false&gist=
pragma solidity ^0.4.18;
contract Test {
address owner;
uint256 val = 256;
address otherContract;
constructor() public{
owner = msg.sender;
@phuctu1901
phuctu1901 / Bot.sol
Created August 15, 2018 10:27
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.4.24+commit.e67f0147.js&optimize=false&gist=
pragma solidity ^0.4.21;
contract BotManagement{
function verifyVehicle(address , string ) public returns (bool) {}
}
contract Bot{
BotManagement botManagementContract;
import wiotp.sdk.device
import datetime
import time
# Sự kiện khi nhận một request từ phía server
def myCommandCallback(cmd):
print("Command received: %s" % cmd.data)
print(cmd.data)
import getopt
import signal
import time
import sys
import json
import wiotp.sdk.application
# Cấu hình cho application có khả năng kết nối tới server
myConfig = {
import requests
url = "https://gentle-fjord-76321.herokuapp.com/verifyDegree"
payload = "{\n\t\"serial_number\":\"serialnumber\",\n\t\"university_code\":\"mta\",\n\t\"hash\":\"hash\"\n}"
headers = {
'Content-Type': "application/json",
'User-Agent': "PostmanRuntime/7.19.0",
'Accept': "*/*",
'Cache-Control': "no-cache",
#自动化安装zsh,oh-my-zsh-tmux,powerline并配置powerline
echo "--- start update ---"
sudo apt-get update
echo "--- end update ---"
echo "--- apt install zsh tmux python-pip ---"
sudo apt-get install zsh tmux python-pip
echo "--- end apt install ---"
echo "--- install oh-my-zsh ---"