Skip to content

Instantly share code, notes, and snippets.


Yehonatan Water Man yonixw

View GitHub Profile
yonixw / haproxy.config
Created Aug 23, 2021 — forked from hzbd/haproxy.config
Sample HAProxy config with logging.
View haproxy.config
pidfile /var/run/
log local0 info
ulimit-n 65536
mode http
clitimeout 600000 # maximum inactivity time on the client side
srvtimeout 600000 # maximum inactivity time on the server side
yonixw /
Created May 6, 2021
lambda for easy s3 upload with curl
import json
import logging
import boto3
from botocore.exceptions import ClientError
from botocore.client import Config
import os
import urllib.parse
Example CURL, need put and file:
yonixw / main.css
Created May 2, 2021
antd full screen dialog
View main.css
@media screen and (max-width: 800px) {
.ant-modal-mask {
animation-duration: 0s !important; /* fade */
.ant-modal-content {
height: 100%;
.ant-modal {
yonixw /
Last active Apr 29, 2021
Get nginx users per day
cat nginx_logs.txt // (docker logs with timestamps, so first col ($1) is time)
| tr -cd '\11\12\15\40-\176' // filter non ascii from bot requests
| grep "/202" // get rows with time like Apr/2021 or Jul/2020
| grep 'qp.png' // get rows which will called once per real user
| awk '{split($5,a,":"); print a[1] "\t" $2}' // print time of day and ip
| uniq -c
| sort -rn
| awk '{arr[$2]+=1} END {for (i in arr) {print substr(i,2),arr[i]}}' // Group IPs per day
View timer.js
const readline = require("readline");
const rl = readline.createInterface({
input: process.stdin,
output: process.stdout
const play = (i)=>{if(i==0)return; console.log('\u0007'); setTimeout(play,1000,i-1)}
rl.question("How long (min) ?", function(min) {
yonixw /
Last active Nov 5, 2020
Concurrent WhatsApp Web across devices and windows


Watch the video version :

This guide will let you run multiple WhatsApp-Web instances. Please note:

  • Send - every message send will happen as soon as possible
  • Read - Your phone will sync with only 1 instance at a time, to get update, you need to trigger it. My choise is to query a message info (any message)

Note: This guide is for educational porpuses only!!! It might break anyday. Use cautionally.

Step 1 - Sync secrets.

yonixw / report_bom.js
Created Oct 7, 2020
SonaType small report for ci cd
View report_bom.js
var http = require('http');
var fs = require('fs');
const { exit } = require('process');
const filename = "./bom.json"
function getReadableFileSizeString(fileSizeInBytes) {
var i = -1;
var byteUnits = [' kB', ' MB', ' GB', ' TB', 'PB', 'EB', 'ZB', 'YB'];
do {
yonixw / index.html
Last active Sep 30, 2020
Dock\Border layout problem with expending content
View index.html
<title>Dock layout problem POC</title>
<script src=""></script>
<script src=""></script>
<link rel="stylesheet" href="">
<title>Dock layout problem POC</title><html>
View search.txt
Android Stduio - Java?
xCode - ioS?
[?] Visual Studio Ext
* C/C++(Tested) Python,Java,C#(Not Tested yet)
* Other languages that __doxygen__ supports:
yonixw / convert.bat
Created Jun 18, 2020
ImageMagick Webtoon black reigon remover
View convert.bat
SET f=31.jpg
REM Pencil:
REM convert -size 256x256 xc: +noise Random -virtual-pixel tile -motion-blur 0x20+135 -charcoal 1 pencil_tile.gif
REM Get the black