Blog 2020/9/1
<- previous | index | next ->
This script downloads one of the QEMU images from https://people.debian.org/~aurel32/qemu/ and boots up a vm.
$ grep -P "^[ABCDEFabcdefOoIi]{6,6}$" /usr/share/dict/words | tr 'OoIi' '0011' | tr '[:lower:]' '[:upper:]' | awk '{print "#" $0}' | |
#ACAD1A | |
#B0BB1E | |
#DEBB1E | |
#AB1DED | |
#ACAC1A | |
#ACCEDE | |
#AC1D1C | |
#BAB1ED | |
#BA0BAB |
""" Use Apple's Vision Framework via PyObjC to detect text in images | |
To use: | |
python3 -m pip install pyobjc-core pyobjc-framework-Quartz pyobjc-framework-Vision wurlitzer | |
""" | |
import pathlib |
Blog 2020/9/1
<- previous | index | next ->
This script downloads one of the QEMU images from https://people.debian.org/~aurel32/qemu/ and boots up a vm.
#!/bin/bash | |
# | |
# Benchmark script for Raspberry Pi OS. | |
# | |
# WARNING: This script is meant to be run as the root user. | |
# This script should never be run on a system/partition you | |
# care about. You should only run this on a system that you | |
# intend to use only for benchmarking and can reinstall or | |
# re-flash easily. | |
# |
#!/bin/bash | |
# Raspberry Pi stress CPU temperature measurement script. | |
# | |
# Download this script (e.g. with wget) and give it execute permissions (chmod +x). | |
# Then run it with ./pi-cpu-stress.sh | |
# | |
# NOTE: In recent years, I've switched to using s-tui. See: | |
# https://github.com/amanusk/s-tui?tab=readme-ov-file#options | |
# Variables. |
Windows Subsystem 2 for Linux, Hyper, ZSH + Oh My Zsh + Powerlevel9k + plugins, FNM + VSCode (+ext) and Nerd Font
To setup native Linux, see this gist
const File = require('vinyl'); | |
const gulp = require("gulp"); | |
const Handlebars = require('handlebars'); | |
const streamArray = require('stream-array'); | |
const ghostContentAPI = require("@tryghost/content-api"); | |
const api = new ghostContentAPI({ | |
url: 'https://demo.ghost.io', | |
key: '22444f78447824223cefc48062', | |
version: "v4" |
# in /etc/systemd/system | |
[Unit] | |
Description=Bluetooth Agent | |
[Service] | |
ExecStart=/usr/bin/bt-agent -c NoInputNoOutput | |
Type=simple | |
[Install] | |
WantedBy=multi-user.target |
#!/usr/bin/env ruby | |
# See https://www.youtube.com/watch?v=gsRTtO-8ofM for details on how to use this | |
require 'net/http' | |
require 'json' | |
CHANNEL_ID = '<CHANNEL_ID_HERE>' | |
API_KEY = '<YOUTUBE_API_KEY_HERE>' | |
YOUTUBE_URL = "https://www.googleapis.com/youtube/v3/channels?part=statistics&id=#{CHANNEL_ID}&key=#{API_KEY}" |
#!/usr/bin/env bash | |
LOG_PATH="/home/$(whoami)/log/speedtest.log" | |
if result=$(/usr/bin/speedtest --simple); then | |
parsed_result=$(printf "${result}\"" | sed ':a;N;$!ba;s/\n/" /g' | sed 's/: /="/g') | |
printf "[$(date)] ${parsed_result}\n" >> "${LOG_PATH}" | |
else | |
printf "[$(date)] error\n" >> "${LOG_PATH}" | |
exit 1 |