Skip to content

Instantly share code, notes, and snippets.

View s3rj1k's full-sized avatar
๐Ÿ€
https://andersoncardoso.github.io/ydd/

s3rj1k s3rj1k

๐Ÿ€
https://andersoncardoso.github.io/ydd/
View GitHub Profile

How to setup a practically free CDN using Backblaze B2 and Cloudflare

โš ๏ธ Note 2023-01-21
Some things have changed since I originally wrote this in 2016. I have updated a few minor details, and the advice is still broadly the same, but there are some new Cloudflare features you can (and should) take advantage of. In particular, pay attention to Trevor Stevens' comment here from 22 January 2022, and Matt Stenson's useful caching advice. In addition, Backblaze, with whom Cloudflare are a Bandwidth Alliance partner, have published their own guide detailing how to use Cloudflare's Web Workers to cache content from B2 private buckets. That is worth reading,

@jparrill
jparrill / Prow_hands_on.md
Last active February 5, 2025 10:12
How to install and Play with CI/CD Prow from Kubernetes test-infra project.

Prow and Quickstart

Prow is a Kubernetes based CI/CD system. Jobs can be triggered by various types of events and report their status to many different services. In addition to job execution, Prow provides GitHub automation in the form of policy enforcement, chat-ops via /foo style commands, and automatic PR merging.

NOTE|WARNING: In order to make Prow work fine with your repo, the Kubernetes cluster MUST be reachable by GitHub Webhook.

Articles to read and understand

@kekru
kekru / 01nginx-tls-sni.md
Last active June 2, 2025 07:15
nginx TLS SNI routing, based on subdomain pattern

Nginx TLS SNI routing, based on subdomain pattern

Nginx can be configured to route to a backend, based on the server's domain name, which is included in the SSL/TLS handshake (Server Name Indication, SNI).
This works for http upstream servers, but also for other protocols, that can be secured with TLS.

prerequisites

  • at least nginx 1.15.9 to use variables in ssl_certificate and ssl_certificate_key.
  • check nginx -V for the following:
    ...
    TLS SNI support enabled
@aliesbelik
aliesbelik / benchmarking-tools.md
Last active July 6, 2025 11:06
Benchmarking & load testing tools
@a-shevtsov
a-shevtsov / Jenkinsfile
Created October 6, 2018 01:08
Running Docker container in Jenkins scripted pipeline
node {
// First parameter represents additional docker run options, second parameter is arguments passed to the image
// docker run [OPTIONS|<First parameter>] IMAGE [COMMAND] [ARG...|<Second parameter>]
docker.image('mesosphere/aws-cli').withRun('--entrypoint /bin/sh', '') {
stage('Build') {
sh 'aws --version'
}
}
}
@bgauduch
bgauduch / multiple-repository-and-identities-git-configuration.md
Last active May 2, 2025 13:16
Git config with multiple identities and multiple repositories

Setup multiple git identities & git user informations

/!\ Be very carrefull in your setup : any misconfiguration make all the git config to fail silently ! Go trought this guide step by step and it should be fine ๐Ÿ˜‰

Setup multiple git ssh identities for git

  • Generate your SSH keys as per your git provider documentation.
  • Add each public SSH keys to your git providers acounts.
  • In your ~/.ssh/config, set each ssh key for each repository as in this exemple:
@hlorand
hlorand / vidstab_ffmpeg.md
Last active July 8, 2025 18:16
Video stabilization using VidStab and FFMPEG

Video stabilization using VidStab and FFMPEG

** Step 1 **

Install ffmpeg with the vidstab plugin.

@extremecoders-re
extremecoders-re / qemu-networking.md
Last active May 31, 2025 06:58
Setting up Qemu with a tap interface

Setting up Qemu with a tap interface

There are two parts to networking within QEMU:

  • The virtual network device that is provided to the guest (e.g. a PCI network card).
  • The network backend that interacts with the emulated NIC (e.g. puts packets onto the host's network).

Example: User mode network

@simonw
simonw / recover_source_code.md
Last active September 28, 2024 08:10
How to recover lost Python source code if it's still resident in-memory

How to recover lost Python source code if it's still resident in-memory

I screwed up using git ("git checkout --" on the wrong file) and managed to delete the code I had just written... but it was still running in a process in a docker container. Here's how I got it back, using https://pypi.python.org/pypi/pyrasite/ and https://pypi.python.org/pypi/uncompyle6

Attach a shell to the docker container

Install GDB (needed by pyrasite)

apt-get update && apt-get install gdb
@ageis
ageis / systemd_service_hardening.md
Last active July 5, 2025 21:37
Options for hardening systemd service units

security and hardening options for systemd service units

A common and reliable pattern in service unit files is thus:

NoNewPrivileges=yes
PrivateTmp=yes
PrivateDevices=yes
DevicePolicy=closed
ProtectSystem=strict