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 python3 | |
import os | |
import requests | |
import argparse | |
API_KEY_VAR = "RANDOMMER_API_KEY" | |
CRYPTO_TYPES = "https://randommer.io/api/Finance/CryptoAddress/Types" | |
CRYPTO_ADDRESS = "https://randommer.io/api/Finance/CryptoAddress" | |
RANDOM_NAME = "https://randommer.io/api/Name" |
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
package cryptpress | |
import ( | |
"bytes" | |
"compress/gzip" | |
"crypto/aes" | |
"crypto/cipher" | |
"crypto/rand" | |
"io" | |
) |
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
# Ignore docker specific files | |
.dockerignore | |
docker-compose.yml | |
Dockerfile | |
# Ignore git directory and files | |
.gitignore | |
.git | |
# Ignore text files at the root of the project (optional) |
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 python3 | |
import mmh3 | |
import json | |
import base64 | |
def topic_hash(name): | |
hash = mmh3.hash128(name.encode('utf-8'), signed=False).to_bytes(16, byteorder='big', signed=False) | |
hash = hash[8:] + hash[:8] |
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 python3 | |
# Uses gcloud commands to cleanup old GCR images and reduce storage costs. | |
import re | |
import json | |
import argparse | |
import subprocess | |
from datetime import datetime, timedelta, timezone | |
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
package main | |
import ( | |
"context" | |
"encoding/json" | |
"fmt" | |
"log" | |
"time" | |
api "github.com/rotationalio/ensign/pkg/api/v1beta1" |
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
package counter | |
import ( | |
"sync" | |
"sync/atomic" | |
) | |
type Counter interface { | |
Inc() | |
Load() uint64 |
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
// Merging a struct from another struct using reflection. | |
package main | |
import ( | |
"encoding/json" | |
"errors" | |
"fmt" | |
"reflect" | |
) |
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
/* | |
Wrapper for a command line editor to edit files. | |
*/ | |
package main | |
import ( | |
"encoding/json" | |
"errors" | |
"flag" | |
"fmt" |
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
package main | |
import ( | |
"crypto/rand" | |
"crypto/rsa" | |
"crypto/tls" | |
"crypto/x509" | |
"crypto/x509/pkix" | |
"encoding/pem" | |
"fmt" |
NewerOlder