Assume two disks for gluster bricks is: sdc sdd
sudo add-apt-repository ppa:gluster/glusterfs-9
export http_proxy=http://proxy:port
export https_proxy=http://proxy:port
sudo -E add-apt-repository ppa:gluster/glusterfs-9
import dom | |
type | |
CanvasRenderingContext* = ref object | |
font* {.importc.}: cstring | |
fillStyle* {.importc.}: cstring | |
ContextAttributes* = ref object | |
alpha* {.importc.}: bool |
import streams, "source/nimpdf" | |
var fo = newFileStream("book.pdf", fmWrite) | |
var doc = initPDF() | |
let pSize = getSizeFromName("A4") | |
var yPos = 15'f64 | |
doc.addPage(pSize, PGO_PORTRAIT) | |
doc.setFont("monospace", {FS_REGULAR}, 5'f64, ENC_UTF8) |
import streams, "source/nimpdf" | |
# используется библиотека nimpdf | |
var iFile = open("oper-instr.txt") | |
var oFile = newFileStream("book.pdf", fmWrite) | |
var opts = makeDocOpt() | |
opts.addFontsPath("/usr/share/fonts/truetype/freefont/") | |
var doc = initPDF(opts) |
import asyncdispatch | |
import httpclient | |
proc getres() : Future[string] {.async.} = | |
var client = newAsyncHttpClient() | |
result = client.getContent("http://google.com") | |
echo(waitFor getres()) |
import asyncdispatch | |
import httpclient | |
import os | |
proc task(i: int): Future[void] {.async.} = | |
echo("Started: " & $i) | |
await sleepAsync(i*1000+500) | |
echo("Ended: " & $i) | |
proc main() {.async.} = |
canvas = null | |
ctx = null | |
old_x = 0 | |
old_y = 0 | |
frame_count = 0 | |
old_frame_num = 0 | |
show_fps = -> |
req = require 'request' | |
fs = require 'fs' | |
username = 'x86128' | |
keys = JSON.parse fs.readFileSync 'keys.json' | |
auth = Buffer.from("#{keys.key}:#{keys.secret}").toString('base64') | |
get_auth_token = (keys, cb) -> | |
opts = |
#!/usr/bin/python3 | |
from serial import Serial | |
from time import sleep | |
ser = Serial('/dev/ttyUSB0') | |
t0 = -10 | |
hello = '00767938383F' | |
spin = '240912' |
FROM python:3.9-alpine | |
RUN mkdir /app | |
COPY sputnik.py /app/ | |
WORKDIR /app | |
CMD python3 sputnik.py |