Skip to content

Instantly share code, notes, and snippets.

@BjoernSchilberg
BjoernSchilberg / blindtiffs.go
Created November 1, 2017 12:37 — forked from s-l-teichmann/blindtiffs.go
A small tool to create a copy of a directory tree with all GeoTIFFs 'blinded' (all values zero) by gdal_calc.py preserving the meta data.
// blindtiffs
// ----------
// Usage: blindtiffs <src> <dst>
// Recursively copies folder <src> to folder <dst>.
// All GeoTIFFs in the source tree are 'blinded' by
// gdal_calc.py to have zero channels but still contain
// all the meta data.
//
// (c) 2017 by Sascha L. Teichmann
@BjoernSchilberg
BjoernSchilberg / xmlToJson.js
Created November 10, 2017 15:39 — forked from chinchang/xmlToJson.js
Function to convert XML to JSON
// Changes XML to JSON
// Modified version from here: http://davidwalsh.name/convert-xml-json
function xmlToJson(xml) {
// Create the return object
var obj = {};
if (xml.nodeType == 1) { // element
// do attributes
if (xml.attributes.length > 0) {
@BjoernSchilberg
BjoernSchilberg / bash_prompt.sh
Created November 30, 2017 09:13 — forked from gryf/bash_prompt.sh
Set color bash prompt according to active virtualenv, Git, Mercurial or Subversion branch and return status of last command.
#!/bin/bash
#
# DESCRIPTION:
#
# Set the bash prompt according to:
# * the active virtualenv
# * the active nodejs virtualenv[1]
# * the branch/status of the current Git, Mercurial or Subversion repository
# * the return value of the previous command
# * one line prompt
import requests
import csv
import datetime
import calendar
import time
i=0
# Change the range depending on how long you like to record the data
for i in range (0,50):
@BjoernSchilberg
BjoernSchilberg / go.mod
Created June 19, 2019 20:32 — forked from mlh758/go.mod
Go Excelize Perf Test
module github.com/mlh758/exc_test
go 1.12
require github.com/360EntSecGroup-Skylar/excelize v1.4.1
@BjoernSchilberg
BjoernSchilberg / Hello.cpp
Created February 23, 2020 22:46 — forked from wuuff/Hello.cpp
CHIP-8 interpreter for Pokitto (WIP)
#include "pokitto.h"
Pokitto::Core game;
//#define SCREEN_W 110
//#define SCREEN_H 88
extern "C" {
#include "chip8.h"
void chip8_initialize(C8* CH8);
@BjoernSchilberg
BjoernSchilberg / accel_demo.go
Created March 18, 2020 19:32 — forked from kianryan/accel_demo.go
tinygo demo for BBC MicroBit using accelerometer and matrix display
package main
import (
"time"
"machine"
"image/color"
"tinygo.org/x/drivers/microbitmatrix"
"tinygo.org/x/drivers/mma8653"
)
@BjoernSchilberg
BjoernSchilberg / README.md
Created May 5, 2020 08:15 — forked from zouppen/README.md
Push to talk microphone with Pulseaudio

Microphone PTT for Pulseaudio

This tool helps you with many absolutely proprietary software which doesn't include proper push-to-talk key. I wrote this with Google Meet in mind but is also useful for many other browser based apps as well.

Like this? Support me at Github!

Installation

@BjoernSchilberg
BjoernSchilberg / ProfilesPS.bat
Created August 18, 2021 09:54 — forked from NotoriousPyro/ProfilesPS.bat
This is a PowerShell script I developed to delete all local profiles off the target PC that aren't: loaded, special (system profiles), have never been logged into, and that have not been used for more than 1 day. The last parameter is configurable via -lt (Get-Date).AddDays(-1)). It will safely delete profiles to avoid system issues such as loca…
@ECHO OFF
echo Powershell profile deleter
set /p PCNAME="PC:"
Powershell -Mta -NoProfile -Command "& {Get-WmiObject Win32_UserProfile -Computer %PCNAME% | Where {(!$_.Special) -and (!$_.Loaded) -and ($_.LastUseTime -ne $null) -and ($_.ConvertToDateTime($_.LastUseTime) -lt (Get-Date).AddDays(-1))} | Remove-WmiObject -Verbose}"
pause