Skip to content

Instantly share code, notes, and snippets.

@Arnavion
Arnavion / 01_build.sh
Created February 3, 2023 05:08
steam in podman container
# ~/src/non-oss-container/build.sh
#!/bin/bash
set -euo pipefail
mkdir -p ~/non-oss-root/
podman image rm --force localhost/non-oss || :
@yched
yched / index.php
Last active February 7, 2023 12:23
Coroutines Guzzle
<?php
// composer require guzzlehttp/guzzle
include ('./vendor/autoload.php');
use GuzzleHttp\Client;
use GuzzleHttp\Promise;
use GuzzleHttp\Psr7\Request;
$promises = [
@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.

@fideloper
fideloper / update_curl.sh
Last active January 11, 2024 15:23
Update curl on Ubuntu 14.04
#! /usr/bin/env bash
# Install any build dependencies needed for curl
sudo apt-get build-dep curl
# Get latest (as of Feb 25, 2016) libcurl
mkdir ~/curl
cd ~/curl
wget http://curl.haxx.se/download/curl-7.50.2.tar.bz2
tar -xvjf curl-7.50.2.tar.bz2
@bftanase
bftanase / secure_link.php
Last active March 28, 2024 06:54
generate URL for nginx secure_link
@rgreenjr
rgreenjr / postgres_queries_and_commands.sql
Last active May 2, 2024 22:20
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'