Skip to content

Instantly share code, notes, and snippets.

View kksudo's full-sized avatar
:octocat:
Software is like sex: It’s better when it’s free.

Kirill kksudo

:octocat:
Software is like sex: It’s better when it’s free.
View GitHub Profile
@kksudo
kksudo / Dockerfile
Created December 25, 2019 10:06
emqtt_bench v.0.3.1
FROM erlang:22-alpine
# install packages
RUN apk update && apk add --no-cache \
bash \
bc \
g++ \
git \
make \
musl-dev \
@kksudo
kksudo / ipaddr_demo.rb
Last active August 29, 2015 14:25 — forked from Lax/ipaddr_demo.rb
Ruby IPAddr class, inet_aton and inet_ntoa equivalence.
require 'ipaddr'
IPAddr.new("192.168.0.1").to_i
=> 3232235521
IPAddr.new(3232235521, Socket::AF_INET).to_s
=> "192.168.0.1"
#!/bin/sh
# ./convert_ploop_to_simfs.sh VEID
# chmod +x convert_ploop_to_simfs.sh
rsync_options='-aHAX --progress --stats --numeric-ids --delete'
partition='vz'
if [ ! -e /etc/vz/conf/$1.conf ]; then
echo "Virtual server configuration file: /etc/vz/conf/$1.conf does not exist."
exit 1
fi
if [ ! -d /$partition/private/$1/root.hdd ]; then