This is inspired by A half-hour to learn Rust and Zig in 30 minutes.
Your first Go program as a classical "Hello World" is pretty simple:
First we create a workspace for our project:
# From https://fedoramagazine.org/wsl-fedora-33/ | |
# prompt ">" indicates Powershell commands | |
# https://docs.microsoft.com/en-us/windows/wsl/install-win10 | |
> dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart | |
> dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart | |
# install https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi | |
> wsl --set-default-version 2 |
This is inspired by A half-hour to learn Rust and Zig in 30 minutes.
Your first Go program as a classical "Hello World" is pretty simple:
First we create a workspace for our project:
/* | |
ClickHouse client version 1.1.53996. | |
Connecting to localhost:9000. | |
Connected to ClickHouse server version 1.1.53996. | |
*/ | |
:) CREATE TABLE IF NOT EXISTS `employee` ( | |
:-] `empid` Int32, | |
:-] `deptid` Int32, | |
:-] `salary` Int64 |
import pandas as pd | |
import visidata as vd | |
df=pd.read_csv('file.csv') | |
vd.view_pandas(df) |
-- original source: https://medium.com/adhawk-engineering/using-postgresql-to-generate-slugs-5ec9dd759e88 | |
-- https://www.postgresql.org/docs/9.6/unaccent.html | |
CREATE EXTENSION IF NOT EXISTS unaccent; | |
CREATE OR REPLACE FUNCTION public.slugify(v TEXT) RETURNS TEXT | |
LANGUAGE plpgsql | |
STRICT IMMUTABLE AS | |
$function$ | |
BEGIN |
create or replace function create_jsonb_flat_view | |
(table_name text, regular_columns text, json_column text) | |
returns text language plpgsql as $$ | |
declare | |
cols text; | |
begin | |
execute format ($ex$ | |
select string_agg(format('%2$s->>%%1$L "%%1$s"', key), ', ') | |
from ( | |
select distinct key |
openssl pkcs8 -nocrypt -topk8 -inform PEM -outform DER -in client-key.pem -out client-key.pk8 |
obj = json.loads(json.dumps(js), object_hook=lambda x: Namespace(**x)) | |
js = vars(obj) # obj.__dict__ |
# Host | |
$ tcpdump -i ${iface} -nn port 5555 | |
# Client | |
$ telnet ${hostip} 5555 |
# https://github.com/docker/for-linux/issues/123#issuecomment-346546953 | |
ip link add name docker0 type bridge | |
ip addr add dev docker0 172.17.0.1/16 |