Skip to content

Instantly share code, notes, and snippets.

View jin10086's full-sized avatar
🏠
Working from home

gaojin jin10086

🏠
Working from home
View GitHub Profile
@jin10086
jin10086 / hidden_twitter_ads.js
Created March 14, 2024 03:06
hidden twitter ads
// ==UserScript==
// @name 去除 tiwtter 广告.
// @namespace http://tampermonkey.net/
// @version 2024-03-14
// @description try to take over the world!
// @author jin
// @match https://twitter.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=twitter.com
// @grant none
// ==/UserScript==
#define uint32_t uint
#define uint64_t ulong
#define uint8_t uchar
#define NULL 0
static void memset(uchar *str, int c, size_t n){
for(int i=0;i<n;i++){
str[i] = c;
}
}
import { readFileSync } from "fs"
import { fromHex } from "@cosmjs/encoding"
import { DirectSecp256k1Wallet, OfflineDirectSigner } from "@cosmjs/proto-signing"
import { SigningStargateClient, StargateClient } from "@cosmjs/stargate"
import { MsgSend } from "cosmjs-types/cosmos/bank/v1beta1/tx"
import { Tx } from "cosmjs-types/cosmos/tx/v1beta1/tx"
const rpc = "https://public-celestia-rpc.numia.xyz"
// 其他 rpc https://docs.celestia.org/nodes/mainnet
/* eslint-disable camelcase */
const path = require('path')
const os = require('os')
const http = require('http')
const https = require('https')
const fetch = require('node-fetch')
/* eslint-disable-next-line */
const { Indexer, CellCollector } = require('@ckb-lumos/indexer')
const { SIMPLE_UDT, ANYONE_CAN_PAY_TESTNET } = require('@nervosnetwork/ckb-sdk-utils/lib/systemScripts')
from http.client import HTTPSConnection
import grpc
import json
import os
import ssl
import sys
from graphql import graphql_pb2_grpc
from graphql.graphql_pb2 import Request
@jin10086
jin10086 / gist:ee2f031f6d65f9c6338cf4ae307f3c92
Created March 16, 2021 05:08
dfuse-query-with-variables.py
from http.client import HTTPSConnection
import grpc
import json
import os
import ssl
import sys
from graphql import graphql_pb2_grpc
from graphql.graphql_pb2 import Request
pragma solidity ^0.6.0;
pragma experimental ABIEncoderV2;
interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
pragma solidity ^0.5.17;
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
pragma solidity 0.5.17;
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0)
return 0;
uint256 c = a * b;
require(c / a == b);
return c;
/**
*Submitted for verification at Etherscan.io on 2020-09-21
*/
// Dependency file: @openzeppelin/contracts/GSN/Context.sol
// SPDX-License-Identifier: MIT
// pragma solidity ^0.6.0;