Skip to content

Instantly share code, notes, and snippets.

View OmarAssadi's full-sized avatar

Omar Assadi OmarAssadi

View GitHub Profile
@OmarAssadi
OmarAssadi / index.js
Last active December 16, 2021 11:52
bbcode syntax highlighter test
// npm install vscode-textmate
const fs = require('fs');
const path = require('path');
const vsctm = require('vscode-textmate');
const oniguruma = require('vscode-oniguruma');
const Console = require("console");
function readFile(path) {
return new Promise((resolve, reject) => {
fs.readFile(path, (error, data) => error ? reject(error) : resolve(data));
@OmarAssadi
OmarAssadi / Fastest rsync over SSH.md
Last active September 27, 2021 07:22
Fastest possible (as far as I am aware) way to transfer files over ssh using rsync

Fastest possible rsync over SSH

Special thanks to: Rsync over SSH - (40MB/s over 1GB NICs)

In this tutorial, we're going to setup the fastest way to do rsync over ssh that I have found. This will lose a lot of the benefits of SSH in that we'll be using no encryption after authentication.

If you'd like to keep encryption, you can skip the "NoneSwitch" and "NoneEnabled" parts of the HPN-SSH installation and remove -o NoneSwitch=yes from the rsync commands. However, doing so will obviously add some overhead.

import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
import org.apache.commons.collections4.map.LRUMap;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.*;
import java.util.stream.Collectors;
@OmarAssadi
OmarAssadi / LICENSE.md
Last active March 4, 2019 09:35
C# boilerplate code for Tomsk State University's regex assignments

Unlicense (Public Domain)

This is free and unencumbered software released into the public domain.

Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.