Skip to content

Instantly share code, notes, and snippets.

View rickbergfalk's full-sized avatar

Rick Bergfalk rickbergfalk

  • Monte Carlo Data
  • Minnesota
View GitHub Profile
@rickbergfalk
rickbergfalk / private_fork.md
Created February 8, 2020 17:24 — forked from 0xjac/private_fork.md
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare git@github.com:usi-systems/easytrace.git

@rickbergfalk
rickbergfalk / get-schema-for-connection-update.js
Created January 27, 2018 15:23
Tips to get hana schema working
const runQuery = require('./run-query.js')
const _ = require('lodash')
const fs = require('fs')
const path = require('path')
const decipher = require('./decipher.js')
const sqldir = path.join(__dirname, '/../resources/')
const sqlSchemaPostgres = fs.readFileSync(sqldir + '/schema-postgres.sql', {
encoding: 'utf8'
@rickbergfalk
rickbergfalk / leveldb-stress-test.js
Created August 22, 2013 16:20
A quick little stress test for nodejs level module. On windows this eventually comes to a crawl, and dies with a out-of-memory exception.
var levelup = require('level');
var db = levelup('./leakydb', {valueEncoding: 'json'});
var BATCH_SIZE = 10000
var BATCH_STARTING_ITERATION = 1000; // start at a high number to make it a bit easier on leveldb puts (1001, 1010, 1100 is more sort friendly than 1, 10, 100)
var BATCH_END_ITERATION = 2000;
var batchIteration = BATCH_STARTING_ITERATION;
var putBatch = function () {
var ops = [];