Skip to content

Instantly share code, notes, and snippets.

Avatar
3 cups required

@greweb gre

3 cups required
View GitHub Profile
@gre
gre / script.js
Created Jun 13, 2022
objkt.com batch send script to run on the page of "Actions" of the token
View script.js
// between the `` you add all the address you want to send to
addresses=``.split("\n").map(_=>_.trim()).filter(Boolean)
async function main() {
$button = [...document.querySelectorAll("button")].filter(
(b) => b.innerText === "Add recipient"
)[0];
let i = 0;
for (a of addresses) {
const $amount = document.getElementById("amount_" + i);
const $address = document.getElementById("address_" + i);
View bitcoin-seizure.frag
precision highp float;
varying vec2 uv;
uniform float time;
vec3 palette( in float t, in vec3 a, in vec3 b, in vec3 c, in vec3 d ) {
return a + b*cos( 6.28318*(c*t+d) );
}
vec3 color (float t) {
return palette(
View image-seizure-effect.frag
precision highp float;
varying vec2 uv;
uniform float time;
uniform sampler2D img;
vec3 palette( in float t, in vec3 a, in vec3 b, in vec3 c, in vec3 d ) {
return a + b*cos( 6.28318*(c*t+d) );
}
vec3 color (float t) {
return palette(
t,
View genAll.sh
#!/bin/bash
cd $(dirname $0)
./genOne.sh sync_Vertcoin Vertcoin
./genOne.sh sync_Dash Dash
./genOne.sh sync_Stakenet Stakenet
./genOne.sh sync_Viacoin Viacoin
./genOne.sh sync_PivX PivX
./genOne.sh sync_Komodo Komodo
@gre
gre / package.json
Last active Dec 13, 2019
live-common in a nutshell
View package.json
{
"private": true,
"name": "send-example",
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"dependencies": {
"@ledgerhq/hw-transport-node-hid-noevents": "canary",
"@ledgerhq/ledger-core": "alpha",
"@ledgerhq/live-common": "alpha",
View tokens_per_holder_count.js
require("babel-polyfill");
const request = require("request");
const { listTokens } = require("@ledgerhq/live-common/lib/currencies");
require("@ledgerhq/live-common/lib/load/tokens/ethereum/erc20");
const delay = ms => new Promise(resolve => setTimeout(resolve, ms));
const fetch = url =>
new Promise((resolve, reject) =>
request(url, (error, response, body) => {
View hooks.js
/*
* I want to trigger something 5s after mount with some props
*/
const Thing = ({ a, b }) => {
useEffect(() => {
const timeout = setTimeout(() => {
doTheThing(a, b);
}, 5000);
View consume_suspense_read.js
async function suspenseReadToPromise(read, ...args) {
let value;
try {
value = read(...args);
} catch (e) {
if (e && typeof e.then === "function") {
value = await e;
}
else {
View keybase.md

Keybase proof

I hereby claim:

  • I am gre on github.
  • I am greweb (https://keybase.io/greweb) on keybase.
  • I have a public key whose fingerprint is 70D1 29E9 37F5 DB8B BC04 6E46 92B0 2128 CF8C 915B

To claim this, I am signing this object:

View Finish.js
class Finish extends r.Component {
constructor(...e) {
var t
return (
(t = super(...e)),
Object.defineProperty(this, 'state', {
configurable: !0,
enumerable: !0,
writable: !0,
value: { emit: !1 },