Skip to content

Instantly share code, notes, and snippets.

Su-Shee / perfect-ui.txt
Last active Aug 7, 2022
My Perfect (G)UI Random Thoughts
View perfect-ui.txt
Perfect UI has context
Middle is what I'm doing, surroundings change dynamically
Recently read that somebody wanted middle of their code editor be edit and
surroundings display usage, libraries, source of the code use
Why would I want "a browser" be a real separate window/application, if it
could be just a scalable/dragdrop component around my editing things
Su-Shee / Dockerfile.postgres-build
Last active Aug 7, 2022
Build Postgres in Docker
View Dockerfile.postgres-build
FROM ubuntu:16.10
# update the repository
RUN apt-get update --fix-missing
# install some basics
RUN apt-get install -y vim curl wget dialog net-tools \
build-essential strace \
perl libperl-dev python python-dev libxml2-dev libxslt-dev \
libreadline-dev zlib1g-dev \
Su-Shee / timeline 1986
Created Dec 8, 2016
teenage behavior archeology
View timeline 1986
unset key
set terminal pngcairo size 900,500 enhanced font "Verdana, 10"
set output "teenage.png"
unset title
#set grid xtics lt 0 lw 2 lc rgb "#990076"
Su-Shee / GnuPlot Coffee Time Plot
Created Dec 6, 2016
GnuPlot Coffee Time Plot
View GnuPlot Coffee Time Plot
unset key
set terminal pngcairo size 900,600 enhanced font "Verdana, 10"
set output "coffee.png"
unset title
set format x ''
View gist:6a71f9272feb8597d488eeec93932f4b
#!/usr/bin/env perl
use Mojolicious::Lite;
use Cwd;
@ARGV = qw(daemon --listen http://*:5000);
app->static->paths->[0] = getcwd;
# needed to setup the usual index.html landing
View gist:892200cbb50cae5e9262e4e1fe5def21
#!/usr/bin/env perl
use strict;
use warnings;
use feature 'say';
use ZMQ::LibZMQ4;
use ZMQ::Constants qw/:all/;
Su-Shee / gist:285ceeaf126add1e9a11
Last active Oct 25, 2015
Falsehoods programmers cannot believe about non-existing things
View gist:285ceeaf126add1e9a11
There is a huge body of valid and yet faked or non-existing things you can use freely e.g. for testing purposes:
* The "Null Island" being a geographical convenience, non-existing island: "Null Island is a fictional island in the Gulf of Guinea
added to the Natural Earth public domain map dataset, located where the equator crosses the prime meridian, at coordinates 0°N 0°E."
see details: - it even has a fake travel website :)
* On TV, you see the recurring fake phone number:
View gist:159affbedef20f0b7a01
cook chickpeas without anything. they freeze well, so make as much as you want. cook them SOFT.
* 1 cup of chickpeas
* 2-3 spoons of tahin
* 2-3 spoons of olive oil
* 2-4 spoons of lemon juice (to taste, I like with more)
View gist:e0ec15df21619be1a9aa
#!/usr/bin/env perl
use strict;
use warnings;
use feature 'say';
use ZMQ::LibZMQ4;
use ZMQ::Constants qw/:all/;
View gist:cd283c2c25d952f8dfd8
I have a cheap validation regex for UUIDs on routes - mostly to distinguish :stuff
my $uuid = qr/[[:xdigit:]]{8}-([[:xdigit:]]{4}-){3}[[:xdigit:]]{12}/;
I use it like so:
$r->get('/comments/:object' => [ object => $uuid ])
or, like this: