Skip to content

Instantly share code, notes, and snippets.

View abel30567's full-sized avatar
:copilot:
You’re Absolutely Right

Claudio Atilano abel30567

:copilot:
You’re Absolutely Right
View GitHub Profile
@abel30567
abel30567 / index.html
Created September 9, 2026 20:40
Primal TCG — Oct/Nov 2026 Content Calendar
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><title>Primal TCG — Oct/Nov 2026 Content Calendar</title><style>:root{--bg:#0e1116;--panel:#161b22;--panel2:#1c232d;--line:#2a3340;--txt:#e6edf3;--mut:#8b98a5;--teal:#2dd4bf;--amber:#f59e0b;--purple:#a78bfa;--green:#34d399;--indigo:#818cf8;--rose:#fb7185;--blue:#38bdf8;--gray:#64748b}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--txt);font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;line-height:1.5}.wrap{max-width:1080px;margin:0 auto;padding:28px 20px 60px}h1{font-size:26px;margin:0 0 4px}.sub{color:var(--teal);font-weight:600;margin:0 0 18px;font-size:15px}.intro{background:var(--panel);border:1px solid var(--line);border-left:4px solid var(--teal);border-radius:10px;padding:16px 18px;margin-bottom:20px;font-size:14px;color:#cdd7e1}.intro b{color:var(--txt)}.legend{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0 26px
const bitcore = require('bitcore-lib');
const Insight = require('bitcore-insight').Insight;
let insight = new Insight('testnet');
// Our private key and address
const wif = 'xBtatQED9H44gCmp6HAdmemAzU3n84H3dGkuWTKvE23JgHMW8gct';
const privateKey = new bitcore.PrivateKey(wif);
const myAddress = privateKey.toAddress();
@abel30567
abel30567 / marketCapWeighted.js
Last active January 4, 2019 21:12
Top 20 Cryptocurrency Market Cap Weighted Algorithm
const request = require('request');
const Table = require('cli-table');
// Algorithm will run every 5 seconds
setInterval( () =>{
// API request to Coin Market Cap for top 20 cryptocurrencies
request('https://api.coinmarketcap.com/v1/ticker/', function(error, response, body) {
const chart = JSON.parse(body);
// The cap of how much of the portfolio could allocate to a certain cryptocurrency (0.05 = 5%)
// no cryptocurrency will surpass this cap amount in portfolio allocation.
@abel30567
abel30567 / hodl20.py
Created May 14, 2018 22:15 — forked from anthonytxie/hodl20.py
Hodl 20 Rebalancing Algorithm
def calc_allocations(self, date, quantity, cap):
"""Figure out ideal allocations for a given date"""
# {
# coin_name: (percent_allocation, data)
# }
top_market = self.get_top_market(date, quantity)
total_cap = sum([coin.market_cap for coin in top_market])
allocations = [{