Skip to content

Instantly share code, notes, and snippets.

View ergatea's full-sized avatar

Xiaoping Tang ergatea

View GitHub Profile
@ergatea
ergatea / contracts...BatcherV2.sol
Created October 21, 2022 00:21
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.8.17+commit.8df45f5f.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
//import "hardhat/console.sol";
contract BatcherV2 {
// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1167.md
address private immutable original;
bytes32 byteCode;
uint n;
address private immutable deployer;
@ergatea
ergatea / contracts...BathXEN.sol
Created October 21, 2022 00:21
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.8.17+commit.8df45f5f.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
interface IXEN {
function claimRank(uint term) external;
function claimMintReward() external;
function claimMintRewardAndShare(address other, uint256 pct) external;
function transfer(address recipient, uint256 amount) external returns (bool);
function balanceOf(address account) external view returns (uint256);
}
did:3:kjzl6cwe1jw14bf2zbag0n2hshq4dktmhxjlimhbgtpeg0adpvnm78gxpx05aqj
@ergatea
ergatea / gist:341f58e6cd4a15818441c01a5bcc3582
Created May 25, 2018 17:05 — forked from pigloo/gist:c4d145f4d18d6d0e441900e02aae92b0
PiggyWoo chart indicators amalgamation
study(title='[PW] PiggyWoo', shorttitle='PW', overlay=true)
//######################################################################
// EMA CANDLES
//######################################################################
// vars
emaPeriod = input(title="GRaB: EMA Period", type=integer, defval=34)
showWave = input(title="GRaB: Show Wave", type=bool, defval=false)
@ergatea
ergatea / git_toturial
Created August 16, 2016 08:44 — forked from guweigang/git_toturial
git命令大全
git init # 初始化本地git仓库(创建新仓库)
git config --global user.name "xxx" # 配置用户名
git config --global user.email "xxx@xxx.com" # 配置邮件
git config --global color.ui true # git status等命令自动着色
git config --global color.status auto
git config --global color.diff auto
git config --global color.branch auto
git config --global color.interactive auto
git config --global --unset http.proxy # remove proxy configuration on git
git clone git+ssh://git@192.168.53.168/VT.git # clone远程仓库
#!/usr/bin/python
# Set up a new A record in Cloudflare, add the details of it along with your account details below
# Make sure this script runs on startup (or whenever you get a new IP...)
#
# @author Aaron Rice <aaron@duedil.com>
import urllib
import json
#!/usr/bin/python
# Set up a new A record in Cloudflare, add the details of it along with your account details below
# Make sure this script runs on startup (or whenever you get a new IP...)
#
# @author Aaron Rice <aaron@duedil.com>
import urllib
import json
@ergatea
ergatea / ocf-cc.py
Created January 27, 2013 15:12 — forked from jjgod/ocf-cc.py
#!/usr/bin/env python
# Convert files in Open Container Format from Traditional Chinese
# to Simplified Chinese.
import sys, os, zipfile, re, codecs, subprocess
from xml.dom import minidom
sys.stdout = codecs.getwriter('utf-8')(sys.stdout)
debug = True
@ergatea
ergatea / zerowall.sh
Created January 20, 2013 14:02
shell gfwlist
#!/bin/bash
cat << EOF
/*
* Proxy Auto-Config file generated by autoproxy2pac
* Rule source: http://autoproxy-gfwlist.googlecode.com/svn/trunk/gfwlist.txt
* Last update: Sat, 16 Jun 2012 16:35:28 GMT
*/
@ergatea
ergatea / init.sh
Created January 19, 2013 15:58
Sublime Text SublimeCodeIntel plugin auto
#!/bin/bash
# This hook is run after a new virtualenv is activated.
# setup python interpretor and sitepackages
# for Sublime Text's SublimeCodeIntel plugin.
# codeintel looks in the root of any folder opened via `subl foldername`
# for project/.codeintel/config
# put the project directory