Skip to content

Instantly share code, notes, and snippets.

@bennylope
bennylope / ffmpeg-watermark.md
Created April 22, 2016 23:17 — forked from webkader/ffmpeg-watermark.md
FFmpeg add a watermark to video

How to Add a Watermark to Video

FFMPEG filters provide a powerful way to programmatically enhance or alter videos, and it’s fairly simple to add a watermark to a video using the overlay filter. The easiest way to install ffmpeg is to download a pre-built binary for your specific platform. Then you don’t have to worry about including and installing all the right dependencies and codecs you will be using.

Once you have ffmpeg installed, adding a watermark is as easy as passing your existing source through an overlay filter like so:

ffmpeg -i test.mp4 -i watermark.png -filter_complex "overlay=10:10" test1.mp4

Basically, we’re passing in the original video, and an overlay image as inputs, then passing it through the filter, and saving the output as test1.mp4.

@joepie91
joepie91 / no-your-cryptocurrency-cannot-work.md
Last active April 13, 2024 03:21
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.

@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
@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
REPORTEMAIL=me@example.com
# Additional alert warning prepended if domain has less than this number of days before expiry
EXPIRYALERTDAYS=15
@mattia-beta
mattia-beta / ddos.conf
Last active February 20, 2024 18:42
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 ###
@cgmartin
cgmartin / check-certs.sh
Created January 17, 2016 18:00
Bash SSL Certificate Expiration Check
#!/bin/bash
TARGET="mysite.example.net";
RECIPIENT="hostmaster@mysite.example.net";
DAYS=7;
echo "checking if $TARGET expires in less than $DAYS days";
expirationdate=$(date -d "$(: | openssl s_client -connect $TARGET:443 -servername $TARGET 2>/dev/null \
| openssl x509 -text \
| grep 'Not After' \
|awk '{print $4,$5,$7}')" '+%s');
in7days=$(($(date +%s) + (86400*$DAYS)));
@Neo23x0
Neo23x0 / log4j_rce_detection.md
Last active January 28, 2024 08:19
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
@fabriziosalmi
fabriziosalmi / gpt-dev-tools.md
Last active December 24, 2023 23:37
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.
@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. certificatesresolvers.myresolver.acme.email=myemail@gmail.com
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 3, 2023 10:02
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/