Skip to content

Instantly share code, notes, and snippets.

@mDuo13
mDuo13 / devportal-reorg-guidelines.md
Created May 4, 2018 19:28
Dev Portal Reorg Guidelines

Dev Portal Reorg Guidelines (2018-05)

The Mind Map shows the layout of pages. Most nodes have either a link to the original content or an exclamation-point marker indicating that the content does not yet exist. Each node in the mind map represents one "Page" in Dactyl terminology. The dev portal has only one "target" at the moment, called "local" and all pages should belong to that target.

When you start a reorg task, begin with the latest copy of ripple-dev-portal's master branch (be sure to pull first!) and create a branch from there.

The reorg tasks include:

  1. moving and renaming existing files (mostly done already).
  2. splitting up content from old files into new files, or (rarely) combining content from several old files into one new file.
  3. reformatting page content to fit its new place.
@mDuo13
mDuo13 / sha512half.py
Created October 30, 2017 19:34
SHA-512Half tool
# Commandline tool for calculating "SHA-512Half" hashes of arbitrary strings
#!/bin/env python3
import argparse
from hashlib import sha512
p = argparse.ArgumentParser(description='Calculate SHA-512Half value.')
p.add_argument('preimage', type=str, help='String to hash')
p.add_argument('--lower', '-l', action="store_true", help='Use lowercase letters a-f')
@mDuo13
mDuo13 / lists-and-tables.md
Created January 20, 2017 21:15
List items and tables test

Testing tables with lists.

  1. This is list item one.

    Here's some text inside li one.

  2. This is list item two.

    • This bulleted list is inside li 2.
@mDuo13
mDuo13 / test.md
Created December 13, 2016 18:39
testing how many dashes a column needs to be recognized
This Table Has Some Columns That End Up Being Pretty Long Even Before Getting to the Last One
no colon but it has dashes, two
This Table Has Some Columns That End Up Being Pretty Long Even Before Getting to the Last One
col umn with one
This Table Has Some Columns That End Up Being Pretty Long Even Before Getting to the Last One
@mDuo13
mDuo13 / crypticconditionsdiscography.md
Created July 8, 2016 19:49
Cryptic Conditions (Discography)

Cryptic Conditions Discography

Cryptic Conditions

This self-titled EP was the first sample of the Cryptic Conditions' sound. Only available as a bootleg distributed on BitTorrent, the group's unique sound nevertheless caught on among enthusiasts, eventually landing them a major signing.

Track listing:

Definition List Syntax

word : definition

dolorem ipsum : dolor sit amet

...and so on.

@mDuo13
mDuo13 / find_enableamendment.py
Created June 2, 2016 22:12
search for EnableAmendment (Python)
import txsplain
# You need to modify txsplain's lookup_ledger function for this code to work.
# The code as published doesn't have expand=True. (It's a trivial change though.)
#
# Also This script also doesn't do any error handling (e.g. if one side of your
# search goes beyond the current ledger, it'll just die)
def search_ledger(ledger_index, tx_type):
ledger = txsplain.lookup_ledger(ledger_index=ledger_index, expand=True)
for tx in ledger["transactions"]: