Skip to content

Instantly share code, notes, and snippets.

@micsoftvn
micsoftvn / README.md
Created July 10, 2023 08:42 — forked from daniel-j/README.md
Converts images in a directory to a comic/manga EPUB3 ebook. Can be used to convert extracted CBZ/CBR to EPUB3.

images2epub.py

Converts a directory of images into a modern EPUB3 ebook. Use a tool to extract CBZ/CBR/CBT files and then run this program to generate a nice fixed-layout EPUB ebook of it. You can optionally set the reading direction to right-to-left (e.g. for manga). For Kobo ereaders, use the file extension .kepub.epub to get the modern reader and correct reading direction.

Usage

Install dependencies with pip install imagesize lxml

@micsoftvn
micsoftvn / Banking_Tech.md
Created October 13, 2021 10:10 — forked from lanleft/Banking_Tech.md
Script_zerologon

ZeroLogon 1

from impacket.dcerpc.v5 import nrpc, epm
from impacket.dcerpc.v5.dtypes import NULL
from impacket.dcerpc.v5 import transport
from impacket import crypto
from impacket.dcerpc.v5.ndr import NDRCALL
import impacket

from binascii import hexlify, unhexlify
@micsoftvn
micsoftvn / saltstack.sh
Created October 8, 2021 07:35 — forked from michaelkarrer81/saltstack.sh
[Saltstack Cheat Sheet] #saltstack
# ============
# COMMON TASKS
# ============
# Run state.sls file on minion(s)
salt -G 'os:Ubuntu' state.apply ubuntu1401 # Formula file name without .sls at the end
salt -G 'os:Ubuntu' state.apply ubuntu1401 test=True # Test only (dryrun)
salt -G "minion_roles:ONLINE" state.apply execute_script_example pillar='{"single_instance_update": "aiat"}'
# Webhook state.sls example
@micsoftvn
micsoftvn / pas.py
Created June 2, 2021 18:19 — forked from guddl/pas.py
OpenVPN Access Server // pas.py to disable different operating systems
# Example Access Server Post-Auth script demonstrates three features:
#
# 1. How to set a connecting user's Access Server group based on LDAP
# group settings for the user.
# 2. How to verify that a given Access Server user only logs in using
# a known client machine.
# 3. How to verify that client machine contains up-to-date applications
# (such as virus checker) before allowing it to connect to the server.
#
# https://docs.openvpn.net/docs/access-server/openvpn-access-server-post-auth-scripting.html
----- BEGIN LICENSE -----
Member J2TeaM
Single User License
EA7E-1011316
D7DA350E 1B8B0760 972F8B60 F3E64036
B9B4E234 F356F38F 0AD1E3B7 0E9C5FAD
FA0A2ABE 25F65BD8 D51458E5 3923CE80
87428428 79079A01 AA69F319 A1AF29A4
A684C2DC 0B1583D4 19CBD290 217618CD
@micsoftvn
micsoftvn / Converted_output.csv
Created March 17, 2021 15:29 — forked from b-adams/Converted_output.csv
Converting SRT to XLSX
Entries Timecodes Subtitles
1 00:00:00,104 --> 00:00:02,669 Hi, I'm shell-scripting.
2 00:00:02,982 --> 00:00:04,965 I'm not sure if it would work,
but I'll try it!
3 00:00:05,085 --> 00:00:07,321 There must be a way to do it!
@micsoftvn
micsoftvn / nginx-tuning.md
Created March 2, 2021 09:00 — forked from denji/nginx-tuning.md
NGINX tuning for best performance

Moved to git repository: https://github.com/denji/nginx-tuning

NGINX Tuning For Best Performance

For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.

Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.

You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.

@micsoftvn
micsoftvn / nginx.conf
Created February 26, 2021 10:33 — forked from v0lkan/nginx.conf
Configuring NGINX for Maximum Throughput Under High Concurrency
user web;
# One worker process per CPU core.
worker_processes 8;
# Also set
# /etc/security/limits.conf
# web soft nofile 65535
# web hard nofile 65535
# /etc/default/nginx
@micsoftvn
micsoftvn / MovingAverageCrossOver.ipynb
Created December 31, 2020 10:34 — forked from aggchaitanya/MovingAverageCrossOver.ipynb
moving average crossover strategy
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@micsoftvn
micsoftvn / MovingAverageCrossOver.ipynb
Created December 31, 2020 10:34 — forked from aggchaitanya/MovingAverageCrossOver.ipynb
moving average crossover strategy
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.