Skip to content

Instantly share code, notes, and snippets.

@voobscout
voobscout / nixos_networking.org
Created July 23, 2022 09:08
nixos shennanigans

Ways to setup networking on NixOS

Nixos has 4 different and mutually exclusive ways to setup networking (afaik).

  • networking.interfaces
  • networking.networkmanager
  • services.connman
  • systemd.network

The mutual exclusiveness applies on per interface level.

name street zip city distance promo_zip promo_city
Guten-Tag-Apotheke Altmarkt Galerie Webergasse 1 01067 Dresden 7.4 km 01326 Dresden
Saxonia Internationale-Apotheke Prager Str. 8 A 01069 Dresden 7.2 km 01326 Dresden
Panorama-Apotheke Kohlenstr. 18 B 01189 Dresden 10.0 km 01326 Dresden
Apotheke im Kaufpark Dohnaer Str. 246 01239 Dresden 8.5 km 01326 Dresden
Stadt Apotheke Hauptstr. 46 01589 Riesa 66.6 km 01326 Dresden
Apotheke am Marktkauf Städtelner Str. 54 04416 Markkleeberg 123 km 01326 Dresden
Rosen-Apotheke Niedermarkt 30 04720 Döbeln 58.4 km 01326 Dresden
Apotheke am Friedrichplatz Friedrichplatz 14 04860 Torgau 110 km 01326 Dresden
Pelikan Apotheke im Rathaus-Center Ratsgasse 6 06844 Dessau-Roßlau 186 km 01326 Dresden
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 4.
name,address_src,distance,address_dst
Guten-Tag-Apotheke Altmarkt Galerie,"Webergasse 1
01067
Dresden",7.4 km,"Dresden
01326"
Saxonia Internationale-Apotheke,"Prager Str. 8 A
01069
Dresden",7.2 km,"Dresden
01326"
Panorama-Apotheke,"Kohlenstr. 18 B

Задача

Имеем удалённый массив данных, который нужно показать пользователю.

Этот массив, умеет сам публиковать строчки своей таблицы на любой API webhook.

Как красиво показывать пользователю всю таблицу в привычном формате?

Решение

@voobscout
voobscout / .screenrc
Created August 15, 2017 08:13 — forked from joaopizani/.screenrc
A killer GNU Screen Config
# the following two lines give a two-line status, with the current window highlighted
hardstatus alwayslastline
hardstatus string '%{= kG}[%{G}%H%? %1`%?%{g}][%= %{= kw}%-w%{+b yk} %n*%t%?(%u)%? %{-}%+w %=%{g}][%{B}%m/%d %{W}%C%A%{g}]'
# huge scrollback buffer
defscrollback 5000
# no welcome message
startup_message off
@voobscout
voobscout / cloud-config-master.yaml
Created April 18, 2017 23:45 — forked from ryancurrah/cloud-config-master.yaml
CoreOS w/ Kubernetes Cloud Config
#cloud-config
#type: master
---
hostname: master01
users:
- name: core
passwd: $6$rounds=4096$qTfXAnCBjkQ326$zRFWfe45s3quKvxl2pax1Ml44PCPNQQYXcJ.r0FfkN5jwecdipepTLMNEQCsAcGJkH5NA6BCPr4VIGJNftBIe.
groups:
- sudo
@voobscout
voobscout / keybase.md
Created April 28, 2016 08:56
keybase.io proof

Keybase proof

I hereby claim:

  • I am voobscout on github.
  • I am voobscout (https://keybase.io/voobscout) on keybase.
  • I have a public key whose fingerprint is 30C3 51A1 1210 822E D81F 2D07 5CBD 51DF 79EE 68AC

To claim this, I am signing this object:

@voobscout
voobscout / cloud-service.yaml
Created April 22, 2016 19:08 — forked from popsikle/cloud-service.yaml
CoreOS Baremetal cluster cloud configs, worker and service nodes
#cloud-config
hostname: <%= shortname %>
ssh_authorized_keys:
- ssh-rsa xxxx rsa-key-20120604
coreos:
units:
- name: settimezone.service
command: start
@voobscout
voobscout / .screenrc
Created April 18, 2016 10:17 — forked from shyouhei/.screenrc
Cool way to have screen-in-screen on multiple machines
source .screen/stem4
@voobscout
voobscout / gist:15c6075f7c4a67bdf46be9558f1dca22
Created April 6, 2016 19:16 — forked from radupotop/gist:4013294
PolKit rules to allow mounting, rebooting and network management without a password
// /etc/polkit-1/rules.d/10-rules.rules
// PolKit rules to allow mounting, rebooting and network management without a password.
// User needs to be in storage, power and network groups.
polkit.addRule(function(action, subject) {
if (action.id.match("org.freedesktop.udisks2.") && subject.isInGroup("storage")) {
return polkit.Result.YES;
}
});