Skip to content

Instantly share code, notes, and snippets.

View .hyper.js
// 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',
@corneliusroemer
corneliusroemer / JQfix
Created Apr 23, 2020
JQ fix of inconsistent timestamps
View JQfix
jq 'if .topic == "devices_overview" then .timestamp = (.timestamp * 1000 | round | tostring) else . end' <out
@corneliusroemer
corneliusroemer / diffscript
Created Apr 21, 2020
Comparing text files, only changed lines shown, changed words color highlighted
View diffscript
diff -U 0 gry gryold | wdiff -d | colordiff
@corneliusroemer
corneliusroemer / findgunzip.sh
Last active Apr 16, 2020
Extract and concatenate all .gz files in all subdirectories into a new text file without touching the original files
View findgunzip.sh
find . -name '*.gz' -exec gzip -ckd {} + > test.txt
@corneliusroemer
corneliusroemer / UndeliverableEmailExtractor.js
Created Jan 17, 2020
Google Apps Script that searches for "undeliverable" emails and extracts email addresses that bounced. Pastes emails and context into Google Sheet for analysis.
View UndeliverableEmailExtractor.js
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 / temperature.sh
Created Dec 20, 2019
Get list and temperature of CPU and battery temperature sensors via Android Debug Bridge
View temperature.sh
#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