Skip to content

Instantly share code, notes, and snippets.

t.prefs_.set("background-color","#1e1e1e")
t.prefs_.set("foreground-color", "#e6d4a3")
t.prefs_.set("cursor-color", "#e6d4a3")
t.prefs_.set("color-palette-overrides", ["#1e1e1e","#be0f17","#868715","#cc881a","#377375","#a04b73","#578e57","#978771","#7f7061","#f73028","#aab01e","#f7b125","#719586","#c77089","#7db669","#e6d4a3"])
t.prefs_.set('color-palette-overrides',
["#002831", "#d11c24", "#6cbe6c", "#a57706", "#2176c7", "#c61c6f", "#259286", "#eae3cb", "#006488", "#f5163b", "#51ef84", "#b27e28", "#178ec8", "#e24d8e", "#00b39e", "#fcf4dc"]);
t.prefs_.set('foreground-color', "#9cc2c3");
t.prefs_.set('background-color', "#001e27");
t.prefs_.set('cursor-color', "#9cc2c3")
#!/bin/sh
loop=$(losetup -f)
losetup $loop ubuntu-20.04-preinstalled-server-arm64+raspi.img
partprobe /dev/$loop
mount /dev/${loop}p1 /mnt
cp user-data /mnt/user-data
umount /mnt
losetup -d $loop
#cloud-config
# This needs to be the "user-data" (no extension) file on vfat partition of the official ubuntu
# raspberry pi image.
# This is the user-data configuration file for cloud-init. By default this sets
# up an initial user called "ubuntu" with password "ubuntu", which must be
# changed at first login. However, many additional actions can be initiated on
# first boot from this file. The cloud-init documentation has more details:
#
# https://cloudinit.readthedocs.io/
IN> table.name AS table_name, table.id, CASE table.type WHEN 'l' THEN 'locked' WHEN 'u' THEN 'unlocked' ELSE NULL END, table.age BETWEEN NOW() - INTERVAL 1 
DAY AND NOW() + INTERVAL 1 DAY⏎       

OUT> [
OUT>   "select",
OUT>   undef,
OUT>   [
OUT>     [
OUT>       "alias",
sub quote_columns {
my ($self, @columns) = @_;
my @quoted_columns = ();
state $sql_date_re = do {
my $format = quotemeta(quotemeta($self->quote('__FORMAT__')));
my $sql = quotemeta($self->sql_date_format('__COLUMN__', '__FORMAT__'));
$sql =~ s/__COLUMN__/(.+)/;
$sql =~ s/$format/(.+)/;
$sql;
};
FROM ubuntu:18.04 AS builder
RUN apt-get install build-essential
COPY hello-world /hello-world/
WORKDIR /hello-world/
RUN make hello
FROM ubuntu:18.04
@dylanwh
dylanwh / tt-wtf.pl
Created September 24, 2019 22:42
dump a template toolkit file as perl code
#!/usr/bin/env perl
use 5.20.3;
use Perl::Tidy;
use Template::Parser;
local $/ = undef;
my $tt_code = <ARGV>;
my $parser = Template::Parser->new();
my $result = $parser->parse($tt_code);
Last 15 lines from /home/dylan/.cache/Homebrew/Logs/kubernetes-helm/02.make:
/home/dylan/.linuxbrew/Cellar/go/1.12.6/libexec/src/cmd/link/internal/ld/pcln.go:110 +0x50 fp=0x186b768 sp=0x186b754 pc=0x1935c0
cmd/link/internal/ld.(*Link).pclntab.func1(0x17e0f8c0, 0x52, 0x59)
/home/dylan/.linuxbrew/Cellar/go/1.12.6/libexec/src/cmd/link/internal/ld/pcln.go:242 +0x88 fp=0x186b794 sp=0x186b768 pc=0x1ab1e0
cmd/link/internal/ld.(*Link).pclntab(0x18860a0)
/home/dylan/.linuxbrew/Cellar/go/1.12.6/libexec/src/cmd/link/internal/ld/pcln.go:369 +0x1038 fp=0x186b9c4 sp=0x186b794 pc=0x194a10
cmd/link/internal/ld.Main(0x3e1598, 0x4, 0x8, 0x1, 0xd, 0xe, 0x252f98, 0x12, 0x255ff6, 0x18, ...)
/home/dylan/.linuxbrew/Cellar/go/1.12.6/libexec/src/cmd/link/internal/ld/main.go:235 +0xc0c fp=0x186ba78 sp=0x186b9c4 pc=0x191a68
main.main()
/home/dylan/.linuxbrew/Cellar/go/1.12.6/libexec/src/cmd/link/main.go:65 +0x114 fp=0x186bfc4 sp=0x186ba78 pc=0x1f22ec
@dylanwh
dylanwh / test.erb
Last active May 8, 2019 19:29
test.erb
<% code = do %>
repeating stuff here
<% end %>
<%= code %>
...