Skip to content

Instantly share code, notes, and snippets.

gavinandresen /
Last active Apr 5, 2018
Storing the UTXO as a bit-vector

Half-baked thoughts exploring a different way of implementing a fully-validating BCH node.

The idea is to shift the storage of full transaction data to wallets, and explore how little data a fully validating node could store. This isn't a problem today (the UTXO set easily fits in the RAM of an inexpensive server-class machine), but might eventually be at very large transaction volumes.

Initial block download is a problem today (it is annoying to have to wait several hours or days to sync up a new node), and this scheme could make it orders of magnitude faster by shifting the time when full transaction data is broadcast from initial block download to new transaction announcement.

spivurno / gw-gravity-forms-user-registration-skip-registration-for-existing-email.php
Last active Apr 21, 2021
Gravity Wiz // Gravity Forms // User Registration // Skip Registration if Email Exists
View gw-gravity-forms-user-registration-skip-registration-for-existing-email.php
* Gravity Wiz // Gravity Forms // User Registration // Skip Registration if Email Exists
* If submitted email is already registered, skip registration.
* @version 0.4
* @author David Smith <>
* @license GPL-2.0+
* @link
satra /
Created Oct 16, 2014
Distance Correlation in Python
from scipy.spatial.distance import pdist, squareform
import numpy as np
from numbapro import jit, float32
def distcorr(X, Y):
""" Compute the distance correlation function
>>> a = [1,2,3,4,5]
>>> b = np.array([1,2,9,4,4])
toolmantim / Makefile
Last active Jan 9, 2021
An example of using Make instead of Grunt for fast, simple and maintainable front-end asset compilation.
View Makefile
# A simple Makefile alternative to using Grunt for your static asset compilation
## Usage
# $ npm install
# And then you can run various commands:
# $ make # compile files that need compiling
# $ make clean all # remove target files and recompile from scratch
jassinm /
Last active Apr 7, 2020
c++11 youcompleteme
import os
import ycm_core
from clang_helpers import PrepareClangFlags
# Set this to the absolute path to the folder (NOT the file!) containing the
# compile_commands.json file to use that instead of 'flags'. See here for
# more details:
# Most projects will NOT need to set this to anything; you can just change the
# 'flags' list of compilation flags. Notice that YCM itself uses that approach.
compilation_database_folder = ''
View .jshintrc.js
// NOTE: I added the .js extension to this gist so it would have syntax highlighting. This file should have NO file extension
// Settings
"passfail" : false, // Stop on first error.
"maxerr" : 100, // Maximum error before stopping.
// Predefined globals whom JSHint will ignore.
"browser" : true, // Standard browser globals e.g. `window`, `document`.