Skip to content

Instantly share code, notes, and snippets.

View DarkVss's full-sized avatar
💊
world has gone mad...

Marcus Moriarty DarkVss

💊
world has gone mad...
  • Dreamland of heaven hell
View GitHub Profile
@DarkVss
DarkVss / wireguardClientCreation.sh
Created October 4, 2024 12:59
Wireguard new client creation
#!/bin/bash
MASK=32 # wireguard network mask
DNS="8.8.8.8"
SERVER_IP="<SERVER_IP>"
SERVER_PORT="<SERVER_PORT>" # default is 51820
cd /etc/wireguard/
mkdir -p clients
@DarkVss
DarkVss / elvui
Created April 3, 2024 16:53
Addons backups
!E1!nR1wZjUos4FnNNwylFhiVbeysQkHWI9zM9C2ACIaebFgJfLSizY8q(TVDl5lYgdXm7S1UpmjtKvRU7V(I6UTdnddc9xteKLeEk()PFFpLhrtwrX)sq)UykJVJic9h)7lMpzX4ftUp0Fdlr8WbrCucn0)HFp4UBNnj0Fln65TIWzwgQDe6pLh9J3F6FCGSMd849NcGZ81O1ITHZC63le2XwwcJlzCczzmnCz5Xy7cNddfgbreXsc9)8Kfb3oE4DfhcWj4m409hY2Y)TL5(i)i)aGiHeGQiRLQqlKA4CEMMq5KyPqZe0DsdWZC2RITxhXPRuKFZdlU9pFywaCaanVq3gTkM6tjIBtwhTIiyC)OFqdN55e6V6qQGT7tXSxXJkv8gio(dLh07pn6GqG)w(y4O2fLeTJSxUt5jy5Ah6hZwjL7PNcmeNdOiXI5SxP8rePrvTrlddRsLVN0MroiylO7jr8q)53n8pMSi0FjdeWDZjj0yee500dCeg8zhswhoskZSxOkh1jXV87tFCkdu5XKub4)Ep(Sq)rpee8W93nzAqhCp3oNWbBrhTLDnm6y5aWvWwoGJJkin4H5lU9t3uLWIf7A7z1PRv)bGetfdhLZQJjrF9UoE2DmRiVbe(ZuXLjUMac(P7BnnMDSH4l)rh2SjTDkhyx6a(W3RCkAfnscMZJEHiOlirR)cHNeL8CjTD0PbWVEaBCTqMW5mEq0ok3(u72Otxtxa3gXstvEU56Dd6ChtV(Dmh0p0)ogtmLt2rlp3JWP818qE0d4XFYsOdxgfhjE7Cmb2mYfRCJ58lYiIMK(fKs4I3AHiAGEDokQUDe55k8tzfoHxxhRs5mM8g9YcpCS6HMPvCw9aR68dertJc9cDdSBLEzujK4IeoREfXtQqPMsa8rrLdg0XXqjedh9Ox74TxNEvb1M4CtUogGXhmJxFGtu(z18rpFKje3yB4P52D5z8aVppa1(C51hTMy7E2W)mlCct(2XK2eDoiLavfvum6cKyaW8aVk)TrB0
@DarkVss
DarkVss / img.png
Last active February 12, 2024 07:15
img.png
@DarkVss
DarkVss / markdown_tree_view.md
Created September 21, 2023 07:32
Markdown tree view
├── app
│   ├── Exception 
│   ├── Http
│   │   ├── Controller 
│   │   │   ├── CLI 
│   │   │   └── Web 
│   │   ├── Middleware 
│   │   └──  Router  
│ ├── Model 
@DarkVss
DarkVss / json_parser.sh
Created September 4, 2023 13:53
Bash simple JSON-parser
#!/bin/bash
function json_extract() {
local key=$1
local json=$2
local string_regex='"([^"\]|\\.)*"'
local number_regex='-?(0|[1-9][0-9]*)(\.[0-9]+)?([eE][+-]?[0-9]+)?'
local value_regex="${string_regex}|${number_regex}|true|false|null"
local pair_regex="\"${key}\"[[:space:]]*:[[:space:]]*(${value_regex})"
@DarkVss
DarkVss / large_file_by_chunks.php
Created July 11, 2023 14:43
[PHP] Download/upload large file by chunks
<?php
const CHUNK_SIZE = 50 * 1024 * 1024;
function Download(string $url, string $filename) : bool {
$inputHandler = fopen($url, "r");
$fileHandler = fopen($filename, "w+");
if ($inputHandler === false || $fileHandler === false) {
return false;
}
@DarkVss
DarkVss / nginx.self-signed.cert.md
Created July 10, 2023 06:51
Create self-signed certs for nginx
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private/selfsigned.key -out /etc/ssl/certs/selfsigned.crt
openssl dhparam -out /etc/nginx/dhparam.pem 4096
ecco "ssl_certificate /etc/ssl/certs/selfsigned.crt;"
echo "ssl_certificate_key /etc/ssl/private/selfsigned.key;"
@DarkVss
DarkVss / PharData_custome.php
Last active June 14, 2023 07:13
Add recursive adding directory to standard PharData class
<?php
namespace PharData;
class Custom extends \PharData {
/**
* Add directory and sub-file/directory
*
* @param string $directory
* @param ?string $excludingPath string what path in beginning must by ignore on adding to archive. If pass NULL - set as the parent directory of
@DarkVss
DarkVss / RedmineInstall.md
Last active April 11, 2023 08:57
Redmine installation on Debian family distributives

Redmine

Prepare packages

apt-get update -y
apt-get install apt-transport-https ca-certificates dirmngr gnupg2 -y
apt-get install apache2 apache2-dev libapache2-mod-passenger mariadb-server mariadb-client build-essential ruby-dev libxslt1-dev libmariadb-dev libxml2-dev zlib1g-dev imagemagick libmagickwand-dev curl -y

Первая версия описания номенклатуры

Описание представленное ниже не является конечным руководством к реализации на базе средств 1С, а описанием возможностей требуемых от конечных данных получаемых внешним источником

Идентификаторы в любом виде и назначении должны соответствовать следующему regexp-выражению

[a-zA-Z0-9_\-]

Параметрическое описание каждого товара разделяется на две части: