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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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. |