Skip to content

Instantly share code, notes, and snippets.

View corneliusroemer's full-sized avatar

Cornelius Roemer corneliusroemer

View GitHub Profile
@corneliusroemer
corneliusroemer / temperature.sh
Created December 20, 2019 22:08
Get list and temperature of CPU and battery temperature sensors via Android Debug Bridge
#run from terminal with: adb shell "$(cat temperature.sh)" to get list of temperature sensors and their temperature
#on Android devices
for VARIABLE in $(seq 1 80)
do
cat /sys/devices/virtual/thermal/thermal_zone$VARIABLE/type
cat /sys/devices/virtual/thermal/thermal_zone$VARIABLE/temp
done
@corneliusroemer
corneliusroemer / UndeliverableEmailExtractor.js
Created January 17, 2020 19:21
Google Apps Script that searches for "undeliverable" emails and extracts email addresses that bounced. Pastes emails and context into Google Sheet for analysis.
function processInboxToSheet() {
var threads = GmailApp.search("Undeliverable", 0, 500)
//Replace ID with one of your private spreadsheets ID
var sheet = SpreadsheetApp.openById("16RsL_4fh0WXSICw5VJDHVAKtija21JBxxxxxxxxx").getActiveSheet();
for (var i = 0; i < threads.length; i++) {
var messages = threads[i].getMessages();
for (var j = 0; j < messages.length; j++){
var subject = messages[j].getSubject();
var content = messages[j].getPlainBody();
var date = messages[j].getDate();
@corneliusroemer
corneliusroemer / findgunzip.sh
Last active April 16, 2020 14:46
Extract and concatenate all .gz files in all subdirectories into a new text file without touching the original files
find . -name '*.gz' -exec gzip -ckd {} + > test.txt
@corneliusroemer
corneliusroemer / diffscript
Created April 21, 2020 15:05
Comparing text files, only changed lines shown, changed words color highlighted
diff -U 0 gry gryold | wdiff -d | colordiff
@corneliusroemer
corneliusroemer / JQfix
Created April 23, 2020 16:12
JQ fix of inconsistent timestamps
jq 'if .topic == "devices_overview" then .timestamp = (.timestamp * 1000 | round | tostring) else . end' <out
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// choose either `'stable'` for receiving highly polished,
// or `'canary'` for less polished but more frequent updates
updateChannel: 'stable',
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
{
"nucMutLabelMap": {
"A10195G": [
"20I (Alpha, V1)"
],
"A10317G": [
"21J (Delta)"
],
"A10323G": [
"21J (Delta)",
>MN908947 (Wuhan-Hu-1/2019)
TTELLFLVMFLLTTKRTMFVFLVLLPLVSSQCVNLTTRTQLPPAYTNSFTRGVYYPDKVFRSSVLHSTQDLFLPFFSNVTWFHAIHVSGTNGTKRFDNPVLPFNDGVYFASTEKSNIIRGWIFGTTLDSKTQSLLIVNNATNVVIKVCEFQFCNDPFLGVYYHKNNKSWMESEFRVYSSANNCTFEYVSQPFLMDLEGKQGNFKNLREFVFKNIDGYFKIYSKHTPINLVRDLPQGFSALEPLVDLPIGINITRFQTLLALHRSYLTPGDSSSGWTAGAAAYYVGYLQPRTFLLKYNENGTITDAVDCALDPLSETKCTLKSFTVEKGIYQTSNFRVQPTESIVRFPNITNLCPFGEVFNATRFASVYAWNRKRISNCVADYSVLYNSASFSTFKCYGVSPTKLNDLCFTNVYADSFVIRGDEVRQIAPGQTGKIADYNYKLPDDFTGCVIAWNSNNLDSKVGGNYNYLYRLFRKSNLKPFERDISTEIYQAGSTPCNGVEGFNCYFPLQSYGFQPTNGVGYQPYRVVVLSFELLHAPATVCGPKKSTNLVKNKCVNFNFNGLTGTGVLTESNKKFLPFQQFGRDIADTTDAVRDPQTLEILDITPCSFGGVSVITPGTNTSNQVAVLYQDVNCTEVPVAIHADQLTPTWRVYSTGSNVFQTRAGCLIGAEHVNNSYECDIPIGAGICASYQTQTNSPRRARSVASQSIIAYTMSLGAENSVAYSNNSIAIPTNFTISVTTEILPVSMTKTSVDCTMYICGDSTECSNLLLQYGSFCTQLNRALTGIAVEQDKNTQEVFAQVKQIYKTPPIKDFGGFNFSQILPDPSKPSKRSFIEDLLFNKVTLADAGFIKQYGDCLGDIAARDLICAQKFNGLTVLPPLLTDEMIAQYTSALLAGTITSGWTFGAGAALQIPFAMQMAYRFNGIGVTQNVLYENQKLIANQFNSAIGKIQDSLSSTASALGKLQDVVNQNAQALNTLVKQLSSNFGAISSVLND
[tool.poetry]
name = "nwkfmt"
version = "0.1.0"
description = "Simple Newick tree validator and formatter"
authors = ["Cornelius Roemer <cornelius.roemer@gmail.com>"]
readme = "README.md"
[tool.poetry.scripts]
greet = "nwkfmt.cli:main"