Skip to content

Instantly share code, notes, and snippets.

View tjanez's full-sized avatar

Tadej Janež tjanez

View GitHub Profile
#!/bin/bash
CONFIG_PATH=~/.config/Code
for i in $CONFIG_PATH/User/workspaceStorage/*; do
if [ -f $i/workspace.json ]; then
folder="$(python3 -c "import sys, json; print(json.load(open(sys.argv[1], 'r'))['folder'])" $i/workspace.json 2>/dev/null | sed 's#^file://##;s/+/ /g;s/%\(..\)/\\x\1/g;')"
if [ -n "$folder" ] && [ ! -d "$folder" ]; then
echo "Removing workspace $(basename $i) for deleted folder $folder of size $(du -sh $i|cut -f1)"
import { eddsa } from 'elliptic';
import { sha512 } from 'js-sha512';
import { sha256 } from 'js-sha256';
import * as BN from 'bn.js';
export interface Ed25519Node {
kL: Uint8Array;
kR: Uint8Array;
A: Buffer;
c: Uint8Array;
#!/usr/bin/env perl
#
# Downloaded from http://www.uppmax.uu.se/system/files/fastqFormatDetect.pl_.txt on Jan 19, 2016.
#
# Author: Martin Dahlo / modified Jacques Dainat
#
# Usage: perl scriptname.pl <infile> [-a -t <max seconds to search>]
# ex.
# perl scriptname.pl reads.fq
# perl scriptname.pl reads.fq -a
@tjanez
tjanez / reproducibility-test.sh
Last active May 2, 2020 11:50
Script to test reproducibility of git-archive-all.sh and git's built-in archive command
#!/bin/bash
# Script to test reproducibility of git-archive-all.sh and git's built-in
# archive command
#
# Usage:
# 1. Copy the script to your git directory with submodules.
# 2. Download the git-archive-all.sh script:
# https://raw.githubusercontent.com/meitar/git-archive-all.sh/master/git-archive-all.sh
# and place it somewhere in your $PATH and make it executable.
@tjanez
tjanez / orange_custom_tree.py
Created June 14, 2013 15:34
Implementation of a custom version of Orange's TreeLearner which "forces" the first split to the specified attribute.
#
# orange_custom_tree.py
# Module implementing a custom version of Orange's TreeLearner which "forces"
# the first split to the specified attribute.
#
# Copyright (C) 2013 Tadej Janez
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or