Skip to content

Instantly share code, notes, and snippets.

View mz0's full-sized avatar
☂️
לֹא הַבַּיְשָׁן לָמֵד‎

Mark Zhitomirski mz0

☂️
לֹא הַבַּיְשָׁן לָמֵד‎
View GitHub Profile
@mz0
mz0 / suggest.md
Created April 2, 2020 20:25
DB s4ggest56ns

unknown_msgs - drop column id, capture_id - pri index

ls -l archive/*.pcap | awk '{ fname = $9 ; sub(/^archive\//, "", fname); print fname " " $5 }'
#!/bin/sh
DB=tmp42
DBu=db42u
DBp='passwurt42'
DBH=localhost
DBP=3306
usage() {
echo "This script needs one argument: an SQL script to run, e.g."
@mz0
mz0 / ddns
Last active February 3, 2020 22:03
NetwokManager HE-dDNS hook
#!/bin/sh
#/etc/NetworkManager/dispatcher.d/ddns
arg1=$1
arg2=$2
DUMPS="/tmp/my Dispatch"
IF=enp5s0
name=host1.example.net
. /home/mz0/.ssh/ddns-key # key=6KigGftdvYqEvTW
15:33:32.501 [Thread-27] INFO net.corda.behave.rpc.RpcClient - PartyA,37.110.25.110:13001,flow-execute failed with error: currently only 'Enterprise v43' rpc-client can run 'execute' command.
15:33:32.501 [Thread-28] ERROR net.corda.behave.process.Command - java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: currently only 'Enterprise v43' rpc-client can run 'execute' command.
15:33:32.502 [Thread-28] ERROR net.corda.behave.process.Command - at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)
15:33:32.502 [Thread-28] ERROR net.corda.behave.process.Command - at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1928)
15:33:32.502 [Thread-28] ERROR net.corda.behave.process.Command - at net.corda.behave.tools.rpcClient.RpcCommand.runRpcCommand(Main.kt:179)
15:33:32.502 [Thread-28] ERROR net.corda.behave.process.Command - at net.corda.behave.tools.rpcClient.FlowExecute.run(GeneralCommands.kt:131)
15:33:32.502 [Thread-28]
@mz0
mz0 / TDIR_Russian_CC_dec2019.srt
Last active January 8, 2020 16:37
Субтитры "The driver is red" www.thedriverisred.com
1
00:00:02,041 --> 00:00:05,083
Водитель - красный
2
00:00:05,509 --> 00:00:09,940
(цикады, птицы)
3
00:00:09,940 --> 00:00:12,020
23.611 [T33] I n.c.b.rpc.RpcClient - 12:49:23.610 [ForkJoinPool.commonPool-worker-1] INFO  net.corda.client.rpc.internal.RPCClient - Startup took 1470 msec
24.268 [T33] I n.c.b.rpc.RpcClient - PartyA,192.168.1.214:13000,flow-start failed with error: net.corda.tools.shell.Helper@5b0abd12
24.268 [T34] E n.c.b.process.Command - java.util.concurrent.ExecutionException: No applicable constructor for flow. Problems were:
24.268 [T34] E n.c.b.process.Command - [net.corda.core.identity.Party, long, int, kotlin.jvm.internal.DefaultConstructorMarker]: <constructor missing parameter reflect
24.268 [T34] E n.c.b.process.Command - [net.corda.core.identity.Party, long]: Could not parse as a command: No matching Party found, then tried to directly deserialise
24.268 [T34] E n.c.b.process.Command -  at [Source: UNKNOWN]
24.268 [T34] E n.c.b.process.Command -       at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)
24.269 [T34] E n.c.b.process.Command -       at java.util.concurrent.Completabl
@mz0
mz0 / pragmatic-git.md
Last active September 6, 2019 08:31
Git crash-course plan

Pragmatic Git

What Git is not? It's not SVN, it's not a lifesaver, it's not a backup, it's not an enigma, it's not a nightmare.

Just the right combination of tiny fractions of all of the above done in the most straightforward way :)

Well I lied you, it's borderline

@mz0
mz0 / ansi2html.sh
Created September 4, 2019 10:38
pixelbeat.org - Convert ANSI (terminal) colours and attributes to HTML
#!/bin/sh
# Convert ANSI (terminal) colours and attributes to HTML
# Licence: LGPLv2
# Author:
# http://www.pixelbeat.org/docs/terminal_colours/
# Examples:
# ls -l --color=always | ansi2html.sh > ls.html
# git show --color | ansi2html.sh > last_change.html
wget https://github.com/adobe/brackets/releases/download/release-1.14/Brackets.Release.1.14.64-bit.deb
curl -L https://github.com/adobe/brackets/releases/download/release-1.14/Brackets.Release.1.14.64-bit.deb > Brackets0.deb
dpkg-deb -R ./Brackets0.deb Brackets
sed -i 's/libcurl3/libcurl3 | libcurl4/' Brackets/DEBIAN/control
dpkg-deb -b Brackets Brackets-fixed.deb
sudo apt install -f ./Brackets-fixed.deb
# https://github.com/adobe/brackets/releases
# https://github.com/adobe/brackets/issues/14786#issuecomment-491285972