Skip to content

Instantly share code, notes, and snippets.

View Jacke's full-sized avatar
👀
Mastermind

Stan Sobolev Jacke

👀
Mastermind
View GitHub Profile
@Jacke
Jacke / vectors.md
Created October 3, 2022 14:39 — forked from susam/vectors.md

Recon and Attack Vectors from My Logs

This document contains excerpts from my web server logs collected over a period of 7 years that shows various kinds of recon and attack vectors.

There were a total of 37.2 million lines of logs out of which 1.1 million unique HTTP requests (Method + URI) were found.

$ sed 's/^.* - - \[.*\] "\(.*\) HTTP\/.*" .*/\1/' access.log > requests.txt
@Jacke
Jacke / io.md
Created May 27, 2022 17:27 — forked from dcastro/io.md
IO vs Future and Referential transparency

The problem

These programs are safe to refactor:

object p1 {
  val x = 1 + 123
  val y = 1 + 123
}
@Jacke
Jacke / Correct_GnuPG_Permission.sh
Created April 22, 2022 08:11 — forked from oseme-techguy/Correct_GnuPG_Permission.sh
This fixes the " gpg: WARNING: unsafe permissions on homedir '/home/path/to/user/.gnupg' " error while using Gnupg .
#!/usr/bin/env bash
# To fix the " gpg: WARNING: unsafe permissions on homedir '/home/path/to/user/.gnupg' " error
# Make sure that the .gnupg directory and its contents is accessibile by your user.
chown -R $(whoami) ~/.gnupg/
# Also correct the permissions and access rights on the directory
chmod 600 ~/.gnupg/*
chmod 700 ~/.gnupg
#!/usr/bin/env bash
sudo apt-get update
clear
echo "--------------UPDATED--------"
sudo apt-get install default-jdk
clear
java -version
echo "-------------JAVA INSTALLED----"
@Jacke
Jacke / Effective Scala Case Class Patterns.md
Created April 12, 2022 21:50 — forked from chaotic3quilibrium/Effective Scala Case Class Patterns.md
Article: Effective Scala Case Class Patterns - The guide I wished I had read years ago when starting my Scala journey

Effective Scala Case Class Patterns

Version: 2022.03.02

Available As

@Jacke
Jacke / openssl_cheatsheet.md
Created March 19, 2022 20:01
OpenSSL Cheatsheet

by Alexey Samoshkin

When it comes to security-related tasks, like generating keys, CSRs, certificates, calculating digests, debugging TLS connections and other tasks related to PKI and HTTPS, you’d most likely end up using the OpenSSL tool.

OpenSSL includes tonnes of features covering a broad range of use cases, and it’s difficult to remember its syntax for all of them and quite easy to get lost. man pages are not so helpful here, so often we just Google “openssl how to [use case here]” or look for some kind of “openssl cheatsheet” to recall the usage of a command and see examples.

This post is my personal collection of openssl command snippets and examples, grouped by use case.

@Jacke
Jacke / fork-is-evil-vfork-is-good-afork-would-be-better.md
Created March 5, 2022 23:45 — forked from nicowilliams/fork-is-evil-vfork-is-good-afork-would-be-better.md
fork() is evil; vfork() is goodness; afork() would be better; clone() is stupid

I recently happened upon a very interesting implementation of popen() (different API, same idea) called popen-noshell using clone(2), and so I opened an issue requesting use of vfork(2) or posix_spawn() for portability. It turns out that on Linux there's an important advantage to using clone(2). I think I should capture the things I wrote there in a better place. A gist, a blog, whatever.

This is not a paper. I assume reader familiarity with fork() in particular and Unix in general, though, of course, I link to relevant wiki pages, so if the unfamiliar reader is willing to go down the rabbit hole, they should be able to come ou

Keybase proof

I hereby claim:

  • I am Jacke on github.
  • I am jacke (https://keybase.io/jacke) on keybase.
  • I have a public key whose fingerprint is 3525 F3F7 97FA 4140 F42C EA75 F4DE F918 475A 5F33

To claim this, I am signing this object:

@Jacke
Jacke / http4s.md
Created January 23, 2022 11:09
http4s best practices

Http4s Good Practices

This is a collection of what I consider good practices that I've been learning along the way, designing and writing APIs using Http4s. Be aware that it could be bias towards my preferences.

Stream App

It is recommended to start the Http Server by extending the given fs2.StreamApp. It'll handle resources cleanup automatically for you. Example:

@Jacke
Jacke / git-commit-template.md
Created January 14, 2022 17:35 — forked from lisawolderiksen/git-commit-template.md
Use a Git commit message template to write better commit messages

Using Git Commit Message Templates to Write Better Commit Messages

The always enthusiastic and knowledgeable mr. @jasaltvik shared with our team an article on writing (good) Git commit messages: How to Write a Git Commit Message. This excellent article explains why good Git commit messages are important, and explains what constitutes a good commit message. I wholeheartedly agree with what @cbeams writes in his article. (Have you read it yet? If not, go read it now. I'll wait.) It's sensible stuff. So I decided to start following the