Skip to content

Instantly share code, notes, and snippets.

View assada's full-sized avatar
🥒
Pickle Alex

Oleksii Ilienko assada

🥒
Pickle Alex
View GitHub Profile
REM use hub4com-2.1.0.0-386
REM com0com setup:
REM
REM COM5 real device you want to "man in the middle"
REM virtual pair: COM6 CNCB2
REM virtual pair: COM7 CNCB3
REM
REM hook COM 5 to real device, hook COM6 to application, hook COM7 to monitoring app - eg.realterm
hub4com.exe --route=0:1,2 --route=1:0,2 COM5 \\.\CNCB2 \\.\\CNCB3
@mixxorz
mixxorz / gist:f47df05e468233300255c79eff18fddf
Created April 24, 2020 21:43
World of Warcraft: Google Sheet custom number format for gold
Format: [>9999999999]###\,###\,###"g "##"s "#0"c";[>9999999]###\,###"g "##"s "#0"c";#0"g "00"s "00"c";
How it looks
0g 00s 00c
0g 00s 12c
0g 01s 23c
0g 12s 34c // Does not support hiding silver/copper
1g 23s 45c
12g 34s 56c
123g 45s 67c
@rjz
rjz / crypto-aes-256-gcm-demo.js
Last active March 11, 2024 20:11
example using node.js crypto API with aes-256-gcm
const buffer = require('buffer');
const crypto = require('crypto');
// Demo implementation of using `aes-256-gcm` with node.js's `crypto` lib.
const aes256gcm = (key) => {
const ALGO = 'aes-256-gcm';
// encrypt returns base64-encoded ciphertext
const encrypt = (str) => {
// The `iv` for a given key must be globally unique to prevent
@mpenick
mpenick / CMakeLists.txt
Last active August 23, 2018 07:07
PHP CLion CMakeLists.txt
cmake_minimum_required(VERSION 3.6)
project(php_driver)
set(CMAKE_C_STANDARD 90)
include_directories(/usr/local/include)
include_directories(${CMAKE_SOURCE_DIR}/ext)
include_directories(${CMAKE_SOURCE_DIR}/ext/src/Cassandra)
include_directories(${CMAKE_SOURCE_DIR}/ext/utils)
include_directories(/usr/local/include/php/)
include_directories(/usr/local/include/php/main/)
include_directories(/usr/local/include/php/Zend/)
@ueokande
ueokande / benchmark-commands.md
Last active January 22, 2024 12:38 — forked from jkreps/benchmark-commands.txt
Kafka Benchmark Commands

Benchmark commands

Producer

Setup

bin/kafka-topics.sh \
  --zookeeper zookeeper.example.com:2181 \
  --create \
@cviebrock
cviebrock / ElasticLoggingProvider.php
Created September 29, 2016 14:57
Log Laravel to Elastic/Logstash
<?php namespace App\Providers;
use Elastica\Client;
use Illuminate\Support\ServiceProvider;
use Monolog\Formatter\LogstashFormatter;
use Monolog\Handler\ElasticSearchHandler;
class ElasticLoggingProvider extends ServiceProvider
{
@HarmJ0y
HarmJ0y / keepass2john.py
Created June 30, 2016 06:02
Python port of John the Ripper's keepass2john - extracts a HashCat/john crackable hash from KeePass 1.x/2.X databases
#!/usr/bin/python
# Python port of keepass2john from the John the Ripper suite (http://www.openwall.com/john/)
# ./keepass2john.c was written by Dhiru Kholia <dhiru.kholia at gmail.com> in March of 2012
# ./keepass2john.c was released under the GNU General Public License
# source keepass2john.c source code from: http://fossies.org/linux/john/src/keepass2john.c
#
# Python port by @harmj0y, GNU General Public License
#
@OlegPetrenkoGit
OlegPetrenkoGit / Queries.sql
Last active April 5, 2024 04:51
Sql interview
-- 1. Вывести список сотрудников, получающих заработную плату большую чем у непосредственного руководителя
SELECT *
FROM Employee AS employees, Employee AS chieves
WHERE chieves.id = employees.chief_id AND employees.salary > chieves.salary;
-- 2. Вывести список сотрудников, получающих максимальную заработную плату в своем отделе
SELECT *
FROM Employee AS employees
WHERE employees.salary = (SELECT MAX(salary) FROM Employee AS max WHERE max.department_id = employees.department_id);
@ygotthilf
ygotthilf / jwtRS256.sh
Last active July 14, 2024 00:03
How to generate JWT RS256 key
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key
# Don't add passphrase
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub
cat jwtRS256.key
cat jwtRS256.key.pub
@wesrice
wesrice / AbstractEntity.php
Last active August 4, 2021 22:02
Self Validating Value Objects and Entities (Laravel Implementation)
<?php
abstract class AbstractEntity extends AbstractValueObject
{
/**
* Offset Set
*
* @param mixed $offset
* @param mixed $value
*