Skip to content

Instantly share code, notes, and snippets.

@fabriziosalmi
fabriziosalmi / gpt-dev-tools.md
Last active September 2, 2024 02:01
GPT Development Tools

Hi, on every your messages in the first row put such informations then your message content must be shown after a newline, as this example (replace values with real obtained values)

"⚙️ 1 | 🆔 Funny Name | 💻 developer | 🎚️ 50% | 🐞 0 | 🛡️ yes | 🚀 no | 🔠 1323"

header fields explanation:

  • Iteration Number (⚙️): To track the number of messages exchanged.
  • Label ID (🆔): A random funny name.
  • Mode (💻): To indicate the mode in which I'm operating (developer, as you mentioned).
  • Skill Level (🎚️): To indicate the craziness of the coding skills being simulated.
@miagkyi
miagkyi / 10k_reports_to_tweets.py
Last active March 22, 2024 20:40
Create funny tweets from 10k/q financial reports using gpt
from datetime import datetime, timedelta
import concurrent.futures
import csv
import html
import os
import time
from bs4 import BeautifulSoup
from dotenv import load_dotenv
import nltk
@Neo23x0
Neo23x0 / log4j_rce_detection.md
Last active September 11, 2024 21:41
Log4j RCE CVE-2021-44228 Exploitation Detection

log4j RCE Exploitation Detection

You can use these commands and rules to search for exploitation attempts against log4j RCE vulnerability CVE-2021-44228

Grep / Zgrep

This command searches for exploitation attempts in uncompressed files in folder /var/log and all sub folders

sudo egrep -I -i -r '\$(\{|%7B)jndi:(ldap[s]?|rmi|dns|nis|iiop|corba|nds|http):/[^\n]+' /var/log
@joepie91
joepie91 / no-your-cryptocurrency-cannot-work.md
Last active September 24, 2024 04:36
No, your cryptocurrency cannot work

No, your cryptocurrency cannot work

Whenever the topic of Bitcoin's energy usage comes up, there's always a flood of hastily-constructed comments by people claiming that their favourite cryptocurrency isn't like Bitcoin, that their favourite cryptocurrency is energy-efficient and scalable and whatnot.

They're wrong, and are quite possibly trying to scam you. Let's look at why.

What is a cryptocurrency anyway?

There are plenty of intricate and complex articles trying to convince you that cryptocurrencies are the future. They usually heavily use jargon and vague terms, make vague promises, and generally give you a sense that there must be something there, but you always come away from them more confused than you were before.

@ismailyenigul
ismailyenigul / nextcloud-pgsql-redis-traefikv2-docker-compose.yml
Last active October 11, 2023 13:11
Docker-compose file for nextcloud with pgsql,redis and traefik deployment
# docker network create nextcloud
NOTES:
1. [email protected]
2. TRUSTED_PROXIES values based on your 'nexcloud network'
3. remove traefik.http.middlewares.nextcloud.headers.contentSecurityPolicy and
traefik.http.middlewares.nextcloud.headers.customFrameOptionsValue if you don't want to allow iframe your domain
3
# cat docker-compose.yml
@giansalex
giansalex / docker-php-ext-install.md
Last active October 13, 2024 20:15
docker-php-ext-install Reference
RUN apt update
RUN apt upgrade -y
RUN apt install -y apt-utils
RUN a2enmod rewrite
RUN apt install -y libmcrypt-dev
RUN apt install -y libicu-dev
RUN docker-php-ext-install -j$(nproc) intl
RUN apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng12-dev
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ 
@plutocrat
plutocrat / ssl-check-report.sh
Last active February 24, 2024 14:23
Bash Script to check SSL expiry dates and send a report
#!/bin/bash
# Requires openssl, bc, grep, sed, date, mutt, sort
## Edit these ##
# Space separated list of domains to check
DOMAINLIST="hp.com github.com google.com"
# Where to send the report
[email protected]
# Additional alert warning prepended if domain has less than this number of days before expiry
EXPIRYALERTDAYS=15
@jniltinho
jniltinho / install_pagespeed_nginx.sh
Last active June 26, 2023 19:41
How to Install Nginx and Google PageSpeed on Debian/Ubuntu
#!/bin/bash
## Install PageSpeed on Debian 8/9 and Ubuntu 16.04 64Bits
## https://www.howtoforge.com/tutorial/how-to-install-nginx-and-google-pagespeed-on-ubuntu-16-04/
## http://nginx.org/en/linux_packages.html
## https://www.modpagespeed.com/doc/build_ngx_pagespeed_from_source
## https://developers.google.com/speed/pagespeed/module/
## Debian ISO: https://cdimage.debian.org/cdimage/archive/8.9.0/amd64/iso-cd/
## No Link abaixo tem o pacote do Nginx para o Debian 8 64Bits
## https://github.com/jniltinho/ispconfig/tree/master/packages/debian/jessie
## Run as root (sudo su)
@BusterNeece
BusterNeece / broadcast.sh
Created May 13, 2017 03:29
FunkyWayFM: The shell script used to merge the video feed and AzuraCast-powered radio feed into a single YouTube stream.
#! /bin/bash
VBR="1500k"
FPS="30"
QUAL="veryfast"
YOUTUBE_URL="rtmp://a.rtmp.youtube.com/live2"
KEY=""
VIDEO_SOURCE="/home/ubuntu/video3.mp4"
@mattia-beta
mattia-beta / ddos.conf
Last active November 14, 2024 09:20
IPtables DDoS Protection for VPS
### 1: Drop invalid packets ###
/sbin/iptables -t mangle -A PREROUTING -m conntrack --ctstate INVALID -j DROP
### 2: Drop TCP packets that are new and are not SYN ###
/sbin/iptables -t mangle -A PREROUTING -p tcp ! --syn -m conntrack --ctstate NEW -j DROP
### 3: Drop SYN packets with suspicious MSS value ###
/sbin/iptables -t mangle -A PREROUTING -p tcp -m conntrack --ctstate NEW -m tcpmss ! --mss 536:65535 -j DROP
### 4: Block packets with bogus TCP flags ###