Skip to content

Instantly share code, notes, and snippets.

View dendisuhubdy's full-sized avatar
🚀
at the speed of light

Dendi Suhubdy dendisuhubdy

🚀
at the speed of light
View GitHub Profile
@dendisuhubdy
dendisuhubdy / privatekeysolana.js
Created October 5, 2022 08:24 — forked from Xavier59/privatekeysolana.js
Convert Solana private key from/to base58/uint8array
// exporting from a bs58 private key to an Uint8Array
// == from phantom private key to solana cli id.json key file
// npm install bs58 @solana/web3.js
const web3 = require("@solana/web3.js");
const bs58 = require('bs58');
let secretKey = bs58.decode("[base58 private key here]");
console.log(`[${web3.Keypair.fromSecretKey(secretKey).secretKey}]`);
// exporting back from Uint8Array to bs58 private key
@dendisuhubdy
dendisuhubdy / test.html
Created September 27, 2022 09:46 — forked from justmoon/test.html
SJCL secp256k1
<script src="https://raw.github.com/bitwiseshiftleft/sjcl/master/sjcl.js"></script>
<script src="https://raw.github.com/bitwiseshiftleft/sjcl/master/core/bn.js"></script>
<script src="https://raw.github.com/bitwiseshiftleft/sjcl/master/core/ecc.js"></script>
<script>
// Overwrite NIST-P256 with secp256k1
sjcl.ecc.curves.c256 = new sjcl.ecc.curve(
sjcl.bn.pseudoMersennePrime(256, [[0,-1],[4,-1],[6,-1],[7,-1],[8,-1],[9,-1],[32,-1]]),
"0x14551231950b75fc4402da1722fc9baee",
0,
7,
@dendisuhubdy
dendisuhubdy / tornadoCore.sol
Created August 12, 2022 09:00 — forked from 1-om/tornadoCore.sol
copy of tornado cash
// SPDX-License-Identifier: MIT
// https://tornado.cash
/*
* d888888P dP a88888b. dP
* 88 88 d8' `88 88
* 88 .d8888b. 88d888b. 88d888b. .d8888b. .d888b88 .d8888b. 88 .d8888b. .d8888b. 88d888b.
* 88 88' `88 88' `88 88' `88 88' `88 88' `88 88' `88 88 88' `88 Y8ooooo. 88' `88
* 88 88. .88 88 88 88 88. .88 88. .88 88. .88 dP Y8. .88 88. .88 88 88 88
* dP `88888P' dP dP dP `88888P8 `88888P8 `88888P' 88 Y88888P' `88888P8 `88888P' dP dP
* ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
@dendisuhubdy
dendisuhubdy / docker-compose-v1.yml
Created May 6, 2022 04:16 — forked from markheath/docker-compose-v1.yml
Elasticsearch docker compose examples
version: '2.2'
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:6.4.1
container_name: elasticsearch
environment:
- cluster.name=docker-cluster
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ulimits:
@dendisuhubdy
dendisuhubdy / README.md
Created April 30, 2022 05:17 — forked from nmarley/README.md
Go / C++ bindings example

Go / C++ bindings example

This is an example of Go code calling to a C++ library with a C wrapper.

Build

go build  # this only ensures it compiles
####
# пути к ключам будут вида /solana/validator-keypair.json
# а на хосте они будут лежать в папке /root/solana_blabla. например /root/solana_agx10k
####
#######################################dockerfile####
echo "export SOLANA_NAME=<имя>" | tee -a ~/.bashrc ### например AG
source ~/.bashrc
echo "export SOLANA_DIR=/root/solana_${SOLANA_NAME}" | tee -a ~/.bashrc
@dendisuhubdy
dendisuhubdy / ipv6_proxmox_online.net.md
Created April 5, 2022 10:53 — forked from zwindler/ipv6_proxmox_online.net.md
Configuring IPv6 block from Online.net On Proxmox Host and Guests

Configuring IPv6 block from Online.net On Proxmox Host and Guests

Following the documentation on online.net would get IPv6 to work only in a simple system installation but won't get IPv6 to work with virtualization environment (Exp. Proxmox) as It's missing some IPv6 forwards and proxies on sysctl.conf.

On Proxmox Host (Or Debian if single Debian Installation)

Enable IPv6 on the System:

  • Change Module Options to Enable IPv6:
@dendisuhubdy
dendisuhubdy / gpg_resign.sh
Created February 8, 2022 10:01 — forked from qdequele/gpg_resign.sh
Resign all my old commits with GPG key
#!/bin/sh
cd $1
git filter-branch --commit-filter '
if [ "$GIT_COMMITTER_EMAIL" = "your@email.com" ]
then
git commit-tree -S "$@";
fi
@dendisuhubdy
dendisuhubdy / nacl-encryption.py
Created December 22, 2021 03:53 — forked from noqqe/nacl-encryption.py
An example code for pynacl encryption and decryption (Salsa20+poly1305)
#!/usr/bin/env python2.7
# -*- coding: utf-8 -*-
import nacl.secret
import nacl.utils
import base64
from pyblake2 import blake2b
import getpass
@dendisuhubdy
dendisuhubdy / mass_unfollow_twitter.py
Created October 2, 2021 11:20
mass_unfollow_twitter.py
#! /usr/bin/python3
import tweepy
import time
def limit_handled(cursor):
while True:
try:
yield next(cursor)
except tweepy.errors.TooManyRequests as e: