Skip to content

Instantly share code, notes, and snippets.

@ummjackson
ummjackson / xrpaway.py
Last active November 24, 2022 06:36
XRP Away™️ - automatically block XRP fanatics sliding into your Twitter mentions
# Requirement: pip install tweepy
import tweepy
# Credentials go here (generate at: https://apps.twitter.com)
auth = tweepy.OAuthHandler('consumer_key', 'consumer_secret')
auth.set_access_token('access_token', 'access_token_secret')
# Connect to Twitter
api = tweepy.API(auth)
@DavidBurkett
DavidBurkett / Genesis_Signer.py
Last active August 4, 2023 04:52
Create valid signatures using genesis block.
import math
import ecdsa
import ecdsa.ellipticcurve as EC
#
# Compute the inverse mod p using the extend
# euclidian algorithm.
# See O. Forster, Algorithmische Zahlentheorie
#
def inv_mod_p(x, p):
@ndaidong
ndaidong / install-go.sh
Last active June 1, 2021 21:34
Install Go on Endeavour, Debian, Fedora
#!/bin/bash
export GO_VERSION=1.16.3
export GO_DOWNLOAD_URL=https://storage.googleapis.com/golang/go$GO_VERSION.linux-amd64.tar.gz
export GOROOT=/opt/go
export GOPATH=$GOROOT/packages
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
sudo mkdir $GOROOT
@katopz
katopz / setup-zeromq.sh
Last active August 10, 2021 21:47 — forked from cdjhlee/zeromq_install.sh
Setup zeromq in Ubuntu 16.04
#!/usr/bin/bash
# Download zeromq
# Ref http://zeromq.org/intro:get-the-software
wget https://github.com/zeromq/libzmq/releases/download/v4.2.2/zeromq-4.2.2.tar.gz
# Unpack tarball package
tar xvzf zeromq-4.2.2.tar.gz
# Install dependency
@andkirby
andkirby / slack.sh
Last active January 29, 2024 20:08
Shell/Bash script for sending slack messages.
#!/usr/bin/env bash
####################################################################################
# Slack Bash console script for sending messages.
####################################################################################
# Installation
# $ curl -s https://gist.githubusercontent.com/andkirby/67a774513215d7ba06384186dd441d9e/raw --output /usr/bin/slack
# $ chmod +x /usr/bin/slack
####################################################################################
# USAGE
# Send message to slack channel/user
# thanks Eli! https://github.com/seemethere
import os
import asyncio
import uvloop
from asyncpg import connect, create_pool
from sanic import Sanic
from sanic.response import json
@ninrod
ninrod / solarized-colors.md
Created April 12, 2016 19:07
Solarized Dark values on different color palettes

Solarized Dark values on different color palettes

SOLARIZED HEX 16/8 TERMCOL XTERM HEX L*A*B RGB HSB GNU screen
base03 #002b36 8/4 brblack 234 #1c1c1c 15,-12,-12 0,43,54 193,100,21 K
base02 #073642 0/4 black 235 #262626 20,-12,-12 7,54,66 192,90,26 k
base01 #586e75 10/7 brgreen 240 #585858 45,-07,-07 88,110,117 194,25,46 G
base00 #657b83 11/7 bryellow 241 #626262 50,-07,-07 101,123,131 195,23,51 Y
base0 #839496 12/6 brblue 244 #808080 60,-06,-03 131,148,150 186,13,59 B
base1 #93a1a1 14/4 brcyan 245 #8a8a8a `65,-05
@itsmepetrov
itsmepetrov / nvm_fix.sh
Created November 12, 2015 13:51
Fix NVM to use from root (or sudo)
# StackOverflow: http://stackoverflow.com/questions/21215059/cant-use-nvm-from-root-or-sudo
# Source: https://www.digitalocean.com/community/tutorials/how-to-install-node-js-with-nvm-node-version-manager-on-a-vps
# The below command seems to fix the problem
n=$(which node);n=${n%/bin/node}; chmod -R 755 $n/bin/*; sudo cp -r $n/{bin,lib,share} /usr/local
# The above command is a bit complicated, but all it's doing is copying whatever version of node
# you have active via nvm into the /usr/local/ directory (where user installed global files should
# live on a linux VPS) and setting the permissions so that all users can access them.