Skip to content

Instantly share code, notes, and snippets.

View vasiliishvakin's full-sized avatar

Vasilii Shvakin vasiliishvakin

View GitHub Profile
@vasiliishvakin
vasiliishvakin / touch-zoom-events-example.html
Created February 8, 2024 12:47
touch-zoom-events-example.html
<!DOCTYPE html>
<html>
<header>
<title>Test</title>
<style>
.touchTest {
width: 800px;
height: 600px;
background-color: red;
const canvas = new fabric.Canvas('canvas');
const text = new fabric.Text("Curved text", { left: 50, top: 50 });
canvas.add(text);
let curveAngle = 90;
const lineLength = text.width;
// Calculate the radius based on the curve angle and line length
const curveRadius = (lineLength * lineLength) / (8 * Math.abs(Math.sin(curveAngle * Math.PI / 180 / 2)));
(() => {
// Create the area object
const areaObject = new fabric.Rect({
width: 200,
height: 200,
fill: "transparent",
stroke: "red",
strokeWidth: 2,
selectable: false,
original: { isBase: true },
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOmIDULb86Rm0Pbt+3AVsK7ydts3hUgxx0QIObyZtX7q d5:45:c7:fc:ad:8c:4b:5d:8f:bb:4e:88:1d:d1:64:a4
slice(format(1 + round(toNumber(slice(format(timestamp(now())), 8, 9) + slice(format(timestamp(now())), 1, 2) + slice(format(timestamp(now())), 7, 8)) * (toNumber(replaceAll(id(), "[^0-9]", "")) % 900000 / 10 + 1) * cbrt(abs(timestamp(prop("Created")) / (toNumber(replaceAll(id(), "[^0-9]", "")) % 90000 / 10))))), 8, 11)

zstd

tinc

pve-migrate-restic

VERSION BUILD=9030808 RECORDER=FX
SET !EXTRACT_TEST_POPUP NO
'SET !SINGLESTEP YES
SET !LOOP 1
SET POSTITLE EVAL("var l=\"{{!LOOP}}\"; var r=l===1?2:l*2; r")
'PROMPT {{POSTITLE}} !VAR1
TAB T=1
@vasiliishvakin
vasiliishvakin / Some.php
Created August 7, 2016 05:18
Get chail items
public function getImages()
{
if (null === $this->images) {
$command = new RelationLoadCommand(PageImageRelation::class, $this);
$this->images = $this->delegate($command);
}
return $this->images;
}
upstream php-www {
server unix:/var/run/php5-fpm.sock;
}
@vasiliishvakin
vasiliishvakin / samba
Created May 18, 2016 09:39
init.d script for samba 4.4
#!/usr/bin/env bash
### BEGIN INIT INFO
# Provides: samba
# Required-Start: $network $local_fs $remote_fs
# Required-Stop: $network $local_fs $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Should-Start: slapd