Skip to content

Instantly share code, notes, and snippets.

View canximan's full-sized avatar

Canximan canximan

View GitHub Profile
@demofly
demofly / postgresql-drop-unused-indexes.sh
Created September 27, 2016 11:50
postgresql-drop-unused-indexes.sh
#!/bin/bash
# Written by demofly for Pg 9.4
#
# WARNING: if you ran pg_stat_reset() last month, don't use this script !!!
#
# Get unused indexes and kill it with fire!
DB=postgres
@kevinold
kevinold / gist:368387f8da42ce7d24179f3a14359051
Created September 27, 2016 17:26 — forked from negativo/gist:152716565e4091eb9039f55f9781badd
send sms with aws provider in NODEJS
var AWS = require('aws-sdk');
AWS.config.region = 'your aws region';
AWS.config.update({
accessKeyId: "your access id",
secretAccessKey: "your secret access key",
});
var sns = new AWS.SNS();
var params = {
const { providers, Wallet} = require('ethers')
const { hexConcat } = require('ethers/lib/utils')
require('dotenv').config()
const l2Provider = new providers.JsonRpcProvider('<rpc-here>')
async function main() {
const saltEncoded = '0x0000000000000000000000000000000000000000d3af2663da51c10215000000'
const ctrCode = "0x60c0346100bb574660a052602081017f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a86681527f9ac997416e8ff9d2ff6bebeb7149f65cdae5e32e2b90440b566bb3044041d36a60408301524660608301523060808301526080825260a082019180831060018060401b038411176100a557826040525190206080526123c090816100c1823960805181611b47015260a05181611b210152f35b634e487b7160e01b600052604160045260246000fd5b600080fdfe6040608081526004908136101561001557600080fd5b600090813560e01c80630d58b1db1461126c578063137c29fe146110755780632a2d80d114610db75780632b67b57014610bde57806330f28b7a14610ade5780633644e51514610a9d57806336c7851614610a285780633ff9dcb1146109a85780634fe02b441461093f57806365d9723c146107ac57806387517c451461067a578063927
@BlockmanCodes
BlockmanCodes / 01_deployContracts.js
Created May 22, 2023 13:13
Uniswap V3: Deploy contracts locally - updated may 2023
const { ContractFactory, utils } = require("ethers")
const WETH9 = require("../WETH9.json")
const fs = require('fs');
const { promisify } = require('util');
const artifacts = {
UniswapV3Factory: require("@uniswap/v3-core/artifacts/contracts/UniswapV3Factory.sol/UniswapV3Factory.json"),
SwapRouter: require("@uniswap/v3-periphery/artifacts/contracts/SwapRouter.sol/SwapRouter.json"),
NFTDescriptor: require("@uniswap/v3-periphery/artifacts/contracts/libraries/NFTDescriptor.sol/NFTDescriptor.json"),