This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nmap -A -T4 scanme.nmap.org ming@Ming-ders-MacBook-Pro | |
Starting Nmap 6.47 ( http://nmap.org ) at 2014-09-14 13:04 CST | |
Nmap scan report for scanme.nmap.org (74.207.244.221) | |
Host is up (0.19s latency). | |
Not shown: 997 closed ports | |
PORT STATE SERVICE VERSION | |
22/tcp open ssh OpenSSH 5.3p1 Debian 3ubuntu7.1 (Ubuntu Linux; protocol 2.0) | |
| ssh-hostkey: | |
| 1024 8d:60:f1:7c:ca:b7:3d:0a:d6:67:54:9d:69:d9:b9:dd (DSA) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const ipfsAPI = require("ipfs-http-client"); | |
const chalk = require("chalk"); | |
const { clearLine } = require("readline"); | |
const { globSource } = ipfsAPI; | |
const infura = { host: "ipfs.infura.io", port: "5001", protocol: "https" }; | |
// run your own ipfs daemon: https://docs.ipfs.io/how-to/command-line-quick-start/#install-ipfs | |
// const localhost = { host: "localhost", port: "5002", protocol: "http" }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.0; | |
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; | |
contract CopyItem is ERC1155 { | |
constructor() public ERC1155("http://mars.muzamint.com:3000/{id}.json") { | |
// _mint(msg.sender, 0, 1000, "GOLD"); // owner, token id, amount, data | |
// to use id for cryptokitty id as a copy of cryptokitty erc721 token | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// contracts/GameItems.sol | |
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.6.0; | |
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; | |
contract GameItems is ERC1155 { | |
uint256 public constant GOLD = 0; | |
uint256 public constant SILVER = 1; | |
uint256 public constant THORS_HAMMER = 2; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
*Submitted for verification at Etherscan.io on 2021-01-27 | |
*/ | |
pragma solidity 0.6; | |
contract Demo { | |
event Echo(string message); | |
function echo(string calldata message) external { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# check if git is installed | |
hash git >/dev/null && /usr/bin/env git clone git://github.com/kaochenlong/eddie-vim.git ~/.vim || { | |
echo "sorry, git is not installed in this machine." | |
exit | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<link rel="stylesheet" type="text/css" href="./style.less" /> | |
</head> | |
<body> | |
<img src="./images/header.png" /> | |
More content: <a href="./other.html">Link to another page</a>. | |
<script type="module" src="./index.ts"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ curl https://sdk.cloud.google.com | bash [13:00:26] | |
% Total % Received % Xferd Average Speed Time Time Time Current | |
Dload Upload Total Spent Left Speed | |
100 425 0 425 0 0 179 0 --:--:-- 0:00:02 --:--:-- 179 | |
Downloading Google Cloud SDK install script: https://dl.google.com/dl/cloudsdk/release/install_google_cloud_sdk.bash | |
######################################################################## 100.0% | |
Running install script from: /var/folders/fx/t80gxlyx19x0l00v89frtmbw0000gp/T/tmp.XXXXXXXXXX.o87fIXx2/install_google_cloud_sdk.bash | |
curl -# -f https://dl.google.com/dl/cloudsdk/release/google-cloud-sdk.tar.gz | |
######################################################################## 100.0% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
// Load modules | |
const Boom = require('boom'); | |
const Hoek = require('hoek'); | |
const Joi = require('joi'); | |
// Declare internals |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const request = { method: 'POST', url: '/', headers: { authorization: internals.header('john', '123:45') } }; | |
server.inject(request, (res) => { | |
expect(res.result).to.equal('ok'); | |
done(); | |
}); |
NewerOlder