Skip to content

Instantly share code, notes, and snippets.

View ppKrauss's full-sized avatar
🌴
On vacation

Peter ppKrauss

🌴
On vacation
View GitHub Profile
@heimdallrj
heimdallrj / snakecoin-js.js
Last active October 11, 2018 02:33
JS/nodejs version for aunyks/snakecoin.py
// JS/nodejs version for aunyks/snakecoin.py
// Original: https://gist.github.com/aunyks/8f2c2fd51cc17f342737917e1c2582e2
const sha256 = require('js-sha256');
// Define the Block Class
class Block {
constructor(index, data, previousHash) {
this.index = index;
this.timestamp = new Date();
@ppKrauss
ppKrauss / pgis_shape_descriptor.sql
Created October 1, 2012 10:01
PostGIS shape descriptor, "as rectangle" metrics vector
CREATE FUNCTION shapedescr_sizes(
-- Shape-descriptor "as rectangle" for geometry description by sizes.
gbase geometry, -- input
-- p_seqs integer DEFAULT 8, -- deprecated? for st_buffer(g,w,p_seqs) or point-buffer inference
-- p_shape varchar DEFAULT '', -- will be endcap indicator
p_decplacesof_zero integer DEFAULT 6, -- precision of zero when rounding delta
p_dwmin float DEFAULT 99999999.0, -- change to ex. 0.0001, if to use.
p_deltaimpact float DEFAULT 9999.0 -- internal (maximized by probability of negative delta)
) RETURNS float[] AS $f$
DECLARE
@CristinaSolana
CristinaSolana / gist:1885435
Created February 22, 2012 14:56
Keeping a fork up to date

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream