Skip to content

Instantly share code, notes, and snippets.

new_1-1,53,114,4 script Vitalik#nv1 727,{
mes "[Vitalik]";
mes "Welcome to stupid hackathon#4";
mes "We will hold pvp map on prontera";
next;
menu "Prepare for Battle",L_Job,"Heal me pls",L_Heal,"Join the Battle",L_Warp;
close;
L_Heal:
percentheal 100, 100;
// kill player
{
"command": "@nuke $player",
"issuer": "tester",
"account_id": "2000001"
}
// doom
{
"command": "@doom",
@apemon
apemon / app.js
Created June 25, 2020 14:45
Stupid-Hack API
const express = require('express');
const bodyParser = require('body-parser');
const mysql = require('mysql');
const config = {
host: '157.230.243.208',
user: 'rathena',
password: 'P@ssw0rd#123',
database: 'rathena'
};
pragma solidity ^0.6.2;
pragma experimental ABIEncoderV2;
import {SafeMath} from "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v3.0.1/contracts/math/SafeMath.sol";
library BalanceManager {
using SafeMath for uint256;
// Storage
struct AccountBalance {

Build libra cli

./scripts/cli/start_cli_testnet.sh

@apemon
apemon / git-clone.md
Last active August 23, 2019 20:11
libra-windows-command

Clone libra repo

git clone https://github.com/apemon/libra.git

Swith to testnet branch

cd libra
git checkout testnet

Run dev_setup.sh

@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
if [[ "$OSTYPE" == "linux-gnu" ]]; then
if which yum &>/dev/null; then
PACKAGE_MANAGER="yum"
...
fi
elif [[ "$OSTYPE" == "darwin"* ]]; then
if which brew &>/dev/null; then
PACKAGE_MANAGER="brew"
...
fi
// generate new keypair for transfer cash
val (_, cashKeys) = Cash.generateSpend(serviceHub, builder, amount, ourIdentityAndCert, creditor)
// key to sign for transfer cash, notice that you will need another key for confidentially
val myKeysToSign = (cashKeys.toSet() + ourIdentity.owningKey).toList()
// send confidential to counterparty
subFlow(IdentitySyncFlow.Send(counterPartySession, ptx.tx))
@CordaService
class ProxyNameOracle(val services: ServiceHub): SingletonSerializeAsToken() {
private val myKey = services.myInfo.legalIdentities.first().owningKey
fun query(identifier: String): ProxyName {
val databaseService = services.cordaService(ProxyNameDatabaseService::class.java)
return databaseService.queryProxyName(identifier)
}
fun sign(ftx: FilteredTransaction): TransactionSignature {