This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM erlang:22-alpine | |
# install packages | |
RUN apk update && apk add --no-cache \ | |
bash \ | |
bc \ | |
g++ \ | |
git \ | |
make \ | |
musl-dev \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'ipaddr' | |
IPAddr.new("192.168.0.1").to_i | |
=> 3232235521 | |
IPAddr.new(3232235521, Socket::AF_INET).to_s | |
=> "192.168.0.1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
NewerOlder