Skip to content

Instantly share code, notes, and snippets.

View suraneti's full-sized avatar
:octocat:
We live in a twilight world.

Suraneti suraneti

:octocat:
We live in a twilight world.
  • Token X
  • Bangkok, Thailand
View GitHub Profile
<!DOCTYPE html>
<html lang="en" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:v="urn:schemas-microsoft-com:vml">
<head>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Prompt&display=swap" rel="stylesheet">
<style type="text/css">
// Note that the script needs the ABI which is generated from the compilation artifact.
// Make sure contract is compiled and artifacts are generated
(async () => {
const sleep = ms => new Promise(r => setTimeout(r, ms));
try {
const artifactsPath = `browser/contracts/artifacts/Storage.json` // Change this for different path
const metadata = JSON.parse(await remix.call('fileManager', 'getFile', artifactsPath))
@suraneti
suraneti / tokens.yaml
Created March 21, 2022 08:50
Pancakeswap GraphQL - tokens query
query tokens {
now: tokens(where: {id_in: ["0x4d35bd52a7712a7ce6f3ef961da1a5bf5ffcf9e8", "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c", "0xe9e7cea3dedca5984780bafc599bd69add087d56", "0x55d398326f99059ff775485246999027b3197955", "0x0e09fabb73bd3ade0a17ecc321fd13a19e81ce82", "0x3e63e9c8f2297e3c027f8444b4591e2583d8780b", "0x69b14e8d3cebfdd8196bfe530954a0c226e5008e", "0x8ac76a51cc950d9822d68b83fe1ad97b32cd580d", "0xe618ef7c64afede59a81cef16d0161c914ebab17", "0x8f0528ce5ef7b51152a59745befdd91d97091d2f", "0xcd76bc49a69bcdc5222d81c18d4a04dc8a387297", "0x7130d2a12b9bcbfae4f2634d864a1ee1ce3ead9c", "0x8c851d1a123ff703bd1f9dabe631b69902df5f97", "0xca8a893a7464e82bdee582017c749b92e5b45b48", "0x26193c7fa4354ae49ec53ea2cebc513dc39a10aa", "0x2170ed0880ac9a755fd29b2688956bd959f933f8", "0x26619fa1d4c957c58096bbbeca6588dcfb12e109", "0xba96731324de188ebc1ed87ca74544ddebc07d7f", "0xa19d3f4219e2ed6dc1cb595db20f70b8b6866734", "0x3019bf2a2ef8040c242c9a4c5c4bd4c81678b2a1", "0x0812c7045d69cd3a881becab80e23c222cfbe032", "0xe98d920370
@suraneti
suraneti / lottery.json
Created May 11, 2021 17:07
lottery.json
[
{
"inputs": [],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
@suraneti
suraneti / app.js
Created February 5, 2021 03:42
Test
// const circleOne = ["A,B", "A,C", "B,C"];
// const circleTwo = ["B,D", "B,E", "D,E"];
// const circleThree = ["F,G"];
// // const input = [
// // "A,B", // *
// // "A,C", // *
// // "B,C", // *
// // "B,D", // *
// // "D,E", // 0
@suraneti
suraneti / canvas_to_bytes.js
Last active November 14, 2020 02:08
Canvas to chunk btyes
const { createCanvas } = require("canvas");
class Canvas {
createImage() {
const width = 200;
const height = 200;
const canvas = createCanvas(width, height);
const context = canvas.getContext("2d");
context.fillStyle = "#000";
@suraneti
suraneti / app.js
Last active June 25, 2020 06:16
Example of sending command to rAthena database.
const axios = require('axios');
const qs = require('qs');
const payload = qs.stringify({
'command': '@deathnote plan3' // example command
});
const config = {
method: 'post',
url: 'http://128.199.234.106/?module=webcommands',
headers: {