Skip to content

Instantly share code, notes, and snippets.

View dionedomingo's full-sized avatar
🎯
Focusing

Dione Domingo dionedomingo

🎯
Focusing
View GitHub Profile
@Ocramius
Ocramius / Caddyfile
Last active March 11, 2024 22:14
Example docker + docker-compose + caddy + traefik setup that routes to multiple apps from one exposed HTTP port
:80 {
root /serve
}
@mpneuried
mpneuried / Makefile
Last active April 19, 2024 21:06
Simple Makefile to build, run, tag and publish a docker containier to AWS-ECR
# import config.
# You can change the default config with `make cnf="config_special.env" build`
cnf ?= config.env
include $(cnf)
export $(shell sed 's/=.*//' $(cnf))
# import deploy config
# You can change the default deploy config with `make cnf="deploy_special.env" release`
dpl ?= deploy.env
include $(dpl)
@hranicka
hranicka / ob.php
Last active May 5, 2023 14:52
PHP flush() under Apache, mod_proxy, php-fpm
<?php
function doFlush()
{
if (!headers_sent()) {
// Disable gzip in PHP.
ini_set('zlib.output_compression', 0);
// Force disable compression in a header.
// Required for flush in some cases (Apache + mod_proxy, nginx, php-fpm).
@niksumeiko
niksumeiko / git.migrate
Last active April 30, 2024 12:54
Moving git repository and all its branches, tags to a new remote repository keeping commits history
#!/bin/bash
# Sometimes you need to move your existing git repository
# to a new remote repository (/new remote origin).
# Here are a simple and quick steps that does exactly this.
#
# Let's assume we call "old repo" the repository you wish
# to move, and "new repo" the one you wish to move to.
#
### Step 1. Make sure you have a local copy of all "old repo"
### branches and tags.