In iTerm2, in the menu bar go to Scripts > Manage > New Python Script
Select Basic. Select Long-Running Daemon
Give the script a decent name (I chose auto_dark_mode.py
)
Save and open the script in your editor of choice.
#!/bin/sh | |
echo '' | |
echo ' __________' | |
echo ' / ___ ___ \' | |
echo ' / / @ \/ @ \ \' | |
echo ' \ \___/\___/ /\' | |
echo ' \____\/____/||' | |
echo ' / /\\\\\//' | |
echo ' | |\\\\\\' |
#!/bin/sh | |
# Requirements: imagemagick (for `identify` and `convert`) and qrencode | |
TEXT="$1" | |
OUT_FILE="$2" | |
QR_IMG_FILE=$(mktemp --suffix=.png) | |
qrencode -s 6 -o "$QR_IMG_FILE" "$TEXT" | |
WIDTH=$(identify -format '%w' "$QR_IMG_FILE") |
#!/usr/bin/env python3 | |
from dataclasses import dataclass, field | |
from functools import reduce | |
from itertools import combinations | |
from math import gcd | |
from typing import List, Set | |
import copy | |
def lcm(denominators): |
Erlang/OTP 20 [erts-9.3] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:10] [kernel-poll:false] | |
Eshell V9.3 (abort with ^G) | |
1> str:print("Here's a hint"). | |
Char: H | |
Char: e | |
Char: r | |
Char: e | |
Char: ' | |
Char: s |
-module(discrep). | |
-export([run/0]). | |
% example of where type annotations fail to perform as expected. | |
% running `dialyzer discrep.erl` will return something similar to: | |
% | |
% Checking whether the PLT /home/joe/.dialyzer_plt is up-to-date... yes | |
% Proceeding with analysis... done in 0m0.29s | |
% done (passed successfully) | |
% |
[Unit] | |
Description=OpenVPN connection to %i | |
[Service] | |
Type=forking | |
ExecStart=/usr/bin/openvpn --cd /etc/openvpn --config /etc/openvpn/%i.conf --daemon openvpn@%i --writepid /run/openvpn@%i.pid | |
PIDFile=/run/openvpn@%i.pid | |
[Install] | |
WantedBy=multi-user.target |
[joe@ryuko packer-arch]$ time packer build arch64.json | |
virtualbox-iso output will be in this color. | |
==> virtualbox-iso: Downloading or copying ISO | |
virtualbox-iso: Downloading or copying: http://www.mirrorservice.org/sites/ftp.archlinux.org/iso/2014.11.01/archlinux-2014.11.01-dual.iso | |
==> virtualbox-iso: Starting HTTP server on port 8975 | |
==> virtualbox-iso: Creating virtual machine... | |
==> virtualbox-iso: Creating hard drive... | |
==> virtualbox-iso: Creating forwarded port mapping for SSH (host port 3148) | |
==> virtualbox-iso: Starting the virtual machine... |