Skip to content

Instantly share code, notes, and snippets.

View rpavlov's full-sized avatar
💭
Pontificating

Roumen Pavlov rpavlov

💭
Pontificating
View GitHub Profile
@QuinnyPig
QuinnyPig / resignation.txt
Last active January 31, 2023 06:51
Templated resignation letter
Dear BOSS,
Please accept this letter as formal notification that I am resigning from my position as JOB TITLE with COMPANY. My last day will be DATE OF LAST DAY.
Thank you so much for the opportunity to work in this position for the past DURATION. I’ve greatly enjoyed and appreciated the opportunities I’ve had to WTF DID YOU DO, and I’ve learned many things, all of which I will take with me throughout my career.
During my last two weeks, I’ll do everything possible to wrap up my duties and train other team members. Please let me know if there’s anything else I can do to aid during the transition.
I wish COMPANY continued success, and I hope to stay in touch in the future.
Sincerely,
@andrebrait
andrebrait / keychron_linux.md
Last active April 23, 2024 19:51
Keychron keyboards on Linux + Bluetooth fixes

Here is the best setup (I think so :D) for K-series Keychron keyboards on Linux.

Note: many newer Keychron keyboards use QMK as firmware and most tips here do not apply to them. Maybe the ones related to Bluetooth can be useful, but everything related to Apple's keyboard module (hid_apple) on Linux, won't work. As far as I know, all QMK-based boards use the hid_generic module instead. Examples of QMK-based boards are: Q, Q-Pro, V, K-Pro, etc.

Most of these commands have been tested on Ubuntu 20.04 and should also work on most Debian-based distributions. If a command happens not to work for you, take a look in the comment section.

Make Fn + F-keys work (NOT FOR QMK-BASED BOARDS)

Older Keychron keyboards (those not based on QMK) use the hid_apple driver on Linux, even in the Windows/Android mode, both in Bluetooth and Wired modes.

#!/usr/bin/env python
import math
import sys
from moviepy.editor import AudioClip, VideoFileClip, concatenate_videoclips
# Get average RGB of part of a frame. Frame is H * W * 3 (rgb)
# Assumes x1 < x2, y1 < y2
@rmiyazaki6499
rmiyazaki6499 / deploy-mern.md
Last active February 24, 2024 05:44
Deploying a Production ready React-Express app on AWS EC2 with CI/CD

Deploying a Production ready React-Express app on AWS

In this tutorial, I will be going over to how to deploy a Javascript app from start to finish using AWS and EC2. Recently, my partner Tu and I launched our app AlgoAcademy (a resource for reviewing algorithms and data structures) and we wanted to share with other developers some of the lessons we learned along the way.

Following this tutorial, you will have an application that has:

  • A React frontend, Express backend
  • An AWS EC2 server configured to host your application
  • SSL-certification with Certbot
  • A custom domain name

How to setup a practically free CDN using Backblaze B2 and Cloudflare

⚠️ Note 2023-01-21
Some things have changed since I originally wrote this in 2016. I have updated a few minor details, and the advice is still broadly the same, but there are some new Cloudflare features you can (and should) take advantage of. In particular, pay attention to Trevor Stevens' comment here from 22 January 2022, and Matt Stenson's useful caching advice. In addition, Backblaze, with whom Cloudflare are a Bandwidth Alliance partner, have published their own guide detailing how to use Cloudflare's Web Workers to cache content from B2 private buckets. That is worth reading,

From: http://redteams.net/bookshelf/
Techie
Unauthorised Access: Physical Penetration Testing For IT Security Teams by Wil Allsopp.
Social Engineering: The Art of Human Hacking by Christopher Hadnagy
Practical Lock Picking: A Physical Penetration Tester's Training Guide by Deviant Ollam
The Art of Deception: Controlling the Human Element of Security by Kevin Mitnick
Hacking: The Art of Exploitation by Jon Erickson and Hacking Exposed by Stuart McClure and others.
Nmap Network Scanning: The Official Nmap Project Guide to Network Discovery and Security Scanning by Fyodor
The Shellcoder's Handbook: Discovering and Exploiting Security Holes by several authors

WeeChat Screenshot

Here I will show you how to create a bar very similar to the nicklist bar, but instead of showing nickname, it will show znc commands, whenever you click on a command, weechat will send a "help the_command_you_just_clicked" and insert the name of the command in the input bar, then enter any arguments required to the command and press enter.

You will need the following script

  1. text_item.py

Let's create the bar

@denji
denji / nginx-tuning.md
Last active April 20, 2024 13:14
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.

@denji
denji / http-benchmark.md
Last active April 23, 2024 02:05
HTTP(S) Benchmark Tools / Toolkit for testing/debugging HTTP(S) and restAPI (RESTful)