Skip to content

Instantly share code, notes, and snippets.

gabrik / pre-commmit
Created Nov 5, 2021
pre-commit and pre-push hooks for Cargo
View pre-commmit
diff=$(cargo fmt -- --check)
if [[ ${result} -ne 0 ]] ; then
cat <<\EOF
There are some code style issues, run `cargo fmt` first.
exit 1
View teleoperation.json
"id": "example-entity-robotic",
"name": "example robotic entity",
"version": "0.2.1",
"entity_version": "0.0.1",
"description": "this is an example entity",
"fdus": [
"id": "tb3-motors",
"name": "turtlebot3_bringup",
gabrik /
Last active Oct 16, 2020
prepare k3s node
sudo apt update && sudo apt upgrade -y
sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common sshpass -y
curl -fsSL | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88
sudo add-apt-repository "deb [arch=amd64] $(lsb_release -cs) stable"
sudo apt-get install docker-ce docker-ce-cli -y
sudo usermod -aG docker $(whoami)
gabrik /
Last active Sep 18, 2020
Machine monitoring to csv
if ($#ARGV != 0 ) {
printf "usage: stat <container number>\n";
open HOSTNAME, "hostname |";
View gist:988bc92f943425c2d3c4c3022d0a33b2
./configure --prefix=/data/data/com.termux/files/usr/
checking for ocamlc... ocamlc
OCaml version is 4.09.0
OCaml library path is /data/data/com.termux/files/usr/lib/ocaml
checking for ocamlopt... ocamlopt
checking for ocamlc.opt... ocamlc.opt
checking for ocamlopt.opt... ocamlopt.opt
checking for ocaml... ocaml
checking for ocamldep... ocamldep
checking for ocamldep.opt... ocamldep.opt
gabrik / container.go
Created Aug 5, 2019
containerd Go Client v1.2.7 Create container attached to existing Network Namespace
View container.go
package main
import (
// "bufio"
// "os"
gabrik / vm_template.xml
Last active Sep 26, 2018
vm xml template
View vm_template.xml
<domain type="kvm">
<name><VM NAME></name>
<memory unit="MB">RAM</memory>
<vcpu placement="static">CPU</vcpu>
<boot dev="hd"/>
gabrik /
Created Sep 26, 2018
Cloud Images Configurator
# This will generate a openstack-style config drive image suitable for
# use with cloud-init. You may optionally pass in an ssh public key
# (using the -k/--ssh-key option) and a user-data blog (using the
# -u/--user-data option).
usage () {
echo "usage: ${0##*/}: [--ssh-key <pubkey>] [--vendor-data <file>] [--user-data <file>] [--uuid <uuid>] [--hostname
<hostname>] <imagename>"