Instantly share code, notes, and snippets.

View test-sleep.py
#! /usr/bin/env python3
import os
import threading
import _thread as thread
import time
import tkinter as tk
import tkinter.scrolledtext as ScrolledText
class myGUI(tk.Frame):
View session.sh
#!/bin/bash
#
# Set up session
mate-terminal --working-directory=/media/bcadmin/Elements/testDDS
mate-terminal --working-directory=/home/bcadmin/forensicImagingResources
caja /home/bcadmin/forensicImagingResources
caja /media/bcadmin/Elements/testDDS
vscode /home/bcadmin/forensicImagingResources/doc/tape-dds.md /home/bcadmin/forensicImagingResources/scripts/readtape.sh &
firefox &
View scrapesite-kbresearch.sh
#!/bin/bash
dirSurfDrive="/home/johan/ownCloud/blogkbresearch"
dirDeploy="/var/www/blog.kbresearch.nl"
# Scrape local instance of kbresearch blog to static site
# 24/8 removed --adjust-extension \
wget --mirror \
--page-requisites \
View 2018-05-18T16_11_57_313Z-debug.log
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'install',
1 verbose cli '@daisy/ace',
1 verbose cli '-g' ]
2 info using npm@5.6.0
3 info using node@v8.11.2
4 verbose npm-session 3ad0708fc6b56d27
5 silly install loadCurrentTree
View floatsBase64.py
#! /usr/bin/env python
import random
import struct
import base64
# Create list of random floating point values
listFloatIn = []
for i in range(20):
View debian_cheatsheet.md

Debian packaging cheat sheet

(From old notes, circa 2013)

List contents

dpkg --contents PACKAGENAME

Remove package

View epub-CB.csv
fileName wordCount
/media/johan/Elements/epub-CB/20150505/20150505123129_9789074622745.epub 100352
/media/johan/Elements/epub-CB/20150505/20150505123129_9789074622752.epub 141269
/media/johan/Elements/epub-CB/20150505/20150505123129_9789074622769.epub 189752
/media/johan/Elements/epub-CB/20150505/20150505123129_9789074622776.epub 77115
/media/johan/Elements/epub-CB/20150505/20150505123129_9789074622783.epub 385038
/media/johan/Elements/epub-CB/20150505/20150505123129_9789074622790.epub 153177
/media/johan/Elements/epub-CB/20150505/20150505123129_9789074622806.epub 294620
/media/johan/Elements/epub-CB/20150505/20150505123129_9789074622813.epub 282505
/media/johan/Elements/epub-CB/20150505/20150505123129_9789074622868.epub 247334
View epubwc.sh
#!/bin/bash
# Perform word count on each EPUB file in directory tree; report result as CSV
#
# Dependencies:
#
# - java
# - tika-server (see link here: https://tika.apache.org/download.html)
# - curl (installed by default on most Unix systems)
# - wc (installed by default on most Unix systems)