Skip to content

Instantly share code, notes, and snippets.

View TechNickAI's full-sized avatar
💭
Heart Centered Technology Leader

Nick Sullivan TechNickAI

💭
Heart Centered Technology Leader
View GitHub Profile
@TechNickAI
TechNickAI / crystalmind.md
Last active September 25, 2023 07:37
CrystalMind README

CrystalMind 🔮

CrystalMind is your personal chief of staff that helps you be a better friend. Be more connected to your digital friends, and be more present with your physical friends.

There's nothing else you have to do right now

We're meant to be in a state of be, not do. It's time to have technology do the work for us, instead of just creating more distractions.

CrystalMind is an advanced personal assistant application designed to make your life easier. With access to the data you provide, it can assist you in various tasks and make decisions on your behalf.

@TechNickAI
TechNickAI / limit_bandwidth.bash
Created May 31, 2023 18:51
Limit Bandwidth by port
#!/bin/bash
# A script to limit the outgoing bandwidth of the consensus and execution layers by port
# We do this because the highest cost for running a node in AWS is the outgoing bandwidth
# Define your ports and their corresponding rate limits
declare -A ports=([30303]="500kbit" [9000]="1mbit")
# Define arbitrary class IDs for each port
declare -A class_ids=([30303]=1 [9000]=2)
@TechNickAI
TechNickAI / get_validator_duties.py
Created May 16, 2023 16:32 — forked from pietjepuk2/get_validator_duties.py
Get validator duties (find largest gap in which to update for that $0.04 it will save/benefit you)
import json
import math
from datetime import datetime, timedelta
import requests
SLOTS_PER_EPOCH = 32
SECONDS_PER_SLOT = 12
@TechNickAI
TechNickAI / crypt.bash
Created March 24, 2023 18:01
encrypt/decrypt text
#!/bin/bash
OPTIONS="-aes-256-cbc -base64 -pbkdf2 -iter 4200000 -salt"
function encrypt {
local input_file="$1"
local output_file="$2"
openssl enc $OPTIONS \
-in "$input_file" \
@TechNickAI
TechNickAI / pull_earnings_data.py
Last active May 11, 2020 20:25
Pulling earnings data from bitfinex
def pull_earnings_data(self):
""" Fetch and store interest performance data (returns) """
c = self.api_client
since = timestamp_from_date(datetime.datetime.utcnow() - datetime.timedelta(days=30))
# Don't supply the wallet' param or you will only get 1 days worth of data. See
# https://docs.bitfinex.com/reference#rest-auth-balance-history
# TODO: Upgrade to v2 API
def test_earnings_flow(self):
# Simulate deposits, interest earnings, and balance redistribution
# Set up Initial ledgers
nick_u = User.objects.get(username="nick")
charlie_u = User.objects.get(username="charlie")
erin_u = User.objects.get(username="erin")
funding_gl = Ledger.objects.create(name="Funding Wallet")
ownership_gl = Ledger.objects.create(name="Ownership - Contributions")
@TechNickAI
TechNickAI / README.md
Last active August 24, 2022 13:36
Trade Execution Engine

Trader

Automated trade execution engine.

The problem

To maintain a standard of vacation-level automation, we need to be able to enter and exit positions at high volume without concern.

Key concerns include:

  • Being able to enter / exit positions at high [relative] volume with a minimal impact on the market
@TechNickAI
TechNickAI / gist:7533105
Created November 18, 2013 18:46
Tooltip server snippet
<script>
// Snippet for Tooltips
(function() {
var s = document.createElement('script'),
n = window.navigator,
language = (n.language || n.systemLanguage || n.browserLanguage || n.userLanguage || '').substring(0, 2),
domain = (location.hostname || ''),
origin = '//tooltips.brightroll.com';
s.src = location.origin + '/loader?lang=' + language + '&domain=' + domain + '&origin=' + origin;
@TechNickAI
TechNickAI / gist:7422423
Created November 11, 2013 23:21
Bookmarklet for previewing viewer controls
// Bookmarklet
javascript:(function(){(function loadScript(url){var script=document.createElement("script"),ref=document.getElementsByTagName('script')[0];script.src=url;ref.parentNode.insertBefore(script,ref);})("http://tpb.brightroll.com/js/viewer_controls.js?"+Math.random());})();
// Source
(function loadScript(url) {
var script = document.createElement("script"),
ref = document.getElementsByTagName('script')[0];
script.src = url;
ref.parentNode.insertBefore(script, ref);
@TechNickAI
TechNickAI / gist:5198931
Created March 19, 2013 18:43
Rolepoint commit log
commit 5c496ad64ffb1af998352a04512b1b9ca148fcc7
Merge: aead06d ba9d57e
Author: Nick Sullivan <nick@sullivanflock.com>
Date: Sat Mar 16 19:26:23 2013 -0700
Fix conflict
commit aead06daa70d9a31836d712efdeb48e38679b613
Author: Nick Sullivan <nick@sullivanflock.com>
Date: Sat Mar 16 19:19:46 2013 -0700