Skip to content

Instantly share code, notes, and snippets.

/**
* Use this file to configure your truffle project. It's seeded with some
* common settings for different networks and features like migrations,
* compilation and testing. Uncomment the ones you need or modify
* them to suit your project as necessary.
*
* More information about configuration can be found at:
*
* trufflesuite.com/docs/advanced/configuration
*
// JSON API --- https://hexdailystats.com/fulldata
// JSON API --- https://hexdailystats.com/livedata
// https://codeakk.medium.com/hex-development-data-a1b1822446fa
// https://togosh.medium.com/hex-developer-guide-3b018a943a55
// NOTE: New rows of historical full data usually get added into database about 20 minutes after 00:00:00 UTC every day
// NOTE: Live data updates every 1 minute
// TEST: Copy and run code with online javascript compiler --- https://jsfiddle.net/
@kbahr
kbahr / BasicUtilities.js
Last active December 29, 2022 14:40
HEX pull interest to date
const Web3 = require('web3');
const compiledContractABI = require('./HEX.abi.json');
const hexAddr = "0x2b591e99afE9f32eAA6214f7B7629768c40Eeb39";
const findStakeAndIndex = async (addr, stakeId) => {
let stakes = await hex.stakeList(addr);
for(let i = 0; i < stakes.length; i++){
if(stakes[i].stakeId === stakeId){

Vertcoin (VTC) was 51% attacked

Preamble

Vertcoin is a Bitcoin clone that aims to be ASIC-resistant by hard forking to new mining algorithms whenever ASICs are deployed on the network. Vertcoin was previously 51% attacked in Dec 2018 and has since changed its proof-of-work algorithm to Lyra2REv3. On Nov 30th 2019, a Vertcoin miner noticed a large upswing in hashrate rental prices for Lyra2REv3 on Nicehash. This was combined with workers connected to Nicehash's stratum server being sent work for unknown (non-public) Vertcoin blocks. I contacted Bittrex, Vertcoin's most prominent exchange, to recommend they disable the Vertcoin wallet on their platform once it became clear an attack was in progress, which they subsequently did.

The Attack

On Sunday, 1 December 2019 15:19:47 GMT 603 blocks were removed from the VTC main chain and replaced by 553 attacker blocks. We

@howkymike
howkymike / currency-dropdown.html
Last active March 17, 2024 23:36
HTML Dropdown Currency List. Compatibile with ISO 4217 standard and extended with the currencies not included in the ISO 4217 but used commercially.
<select id="currencyList">
<option value="USD" selected="selected" label="US dollar">USD</option>
<option value="EUR" label="Euro">EUR</option>
<option value="JPY" label="Japanese yen">JPY</option>
<option value="GBP" label="Pound sterling">GBP</option>
<option disabled>──────────</option>
<option value="AED" label="United Arab Emirates dirham">AED</option>
<option value="AFN" label="Afghan afghani">AFN</option>
<option value="ALL" label="Albanian lek">ALL</option>
<option value="AMD" label="Armenian dram">AMD</option>
@AurelioDeRosa
AurelioDeRosa / coins.md
Last active July 9, 2018 06:20
CPU-minable coins

CPU-minable coins

This file records the cpu-minable coins that I've experimented with. My goal is to keep a list of those that can be mined with a normal machine, like a home laptop, and are profitable. My definition of profitable is a coin that you can mine while using the machine for normal activities, like browsing the web, obtaining at least 1-2 coins per hour.

Last update: 06/01/2018

Profitable

@strophy
strophy / dash_budget_payout_dates.sh
Last active September 5, 2022 15:15 — forked from moocowmoo/dash_budget_payout_dates.sh
estimate future dash budget payout dates
#!/bin/bash
D0=$(TZ=UTC date --date="$(date --date="2015-12-07T08:27:12+0000")");
for block in `seq 398784 16616 $((382168 + (16616*48)))`;
do DD=$(TZ=UTC date --date="$(date --date="$D0") +727 hours +5 minutes +2 seconds");
D0=$DD;
echo "$block - $DD";
done
@yossorion
yossorion / what-i-wish-id-known-about-equity-before-joining-a-unicorn.md
Last active June 25, 2024 07:29
What I Wish I'd Known About Equity Before Joining A Unicorn

What I Wish I'd Known About Equity Before Joining A Unicorn

Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.

This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would

@jagrosh
jagrosh / WebhookTutorial.md
Last active December 4, 2023 20:28
Simple Webhook Tutorial (Twitter -> Discord)

Simple Webhook Tutorial

In this tutorial, I will be explaining how to set up a simple webhook to relay your tweets to a Discord channel

Step 1 - Register on Zapier

  1. Go to https://zapier.com/ and create an account (if you don't already have one).

Step 2 - Make a Discord Webhook

  1. Find the Discord channel in which you would like to send Tweets
@joepie91
joepie91 / vpn.md
Last active July 17, 2024 14:15
Don't use VPN services.

Don't use VPN services.

No, seriously, don't. You're probably reading this because you've asked what VPN service to use, and this is the answer.

Note: The content in this post does not apply to using VPN for their intended purpose; that is, as a virtual private (internal) network. It only applies to using it as a glorified proxy, which is what every third-party "VPN provider" does.

  • A Russian translation of this article can be found here, contributed by Timur Demin.
  • A Turkish translation can be found here, contributed by agyild.
  • There's also this article about VPN services, which is honestly better written (and has more cat pictures!) than my article.