Skip to content

Instantly share code, notes, and snippets.

View faghani's full-sized avatar
👨‍💻
...

alireza faghani faghani

👨‍💻
...
View GitHub Profile
@faghani
faghani / postmortem.md
Created May 16, 2023 10:01 — forked from mlafeldt/postmortem.md
Example Postmortem from SRE book, pp. 487-491

Shakespeare Sonnet++ Postmortem (incident #465)

Date

2015-10-21

Authors

  • jennifer
  • martym
@faghani
faghani / import_db.sh
Created February 9, 2020 15:09
Import large sql file
#!/bin/sh
# store start date to a variable
imeron=`date`
echo "Import started: OK"
dumpfile="[SQL_PATH]"
ddl="set names utf8; "
ddl="$ddl set global net_buffer_length=1000000;"
@faghani
faghani / 00-php-memory-limits.ini
Last active January 16, 2024 17:22
Caddy Laravel Dockerfile
; Max memory per instance
memory_limit = 128M
;The maximum size of an uploaded file.
upload_max_filesize = 128M
;Sets max size of post data allowed. This setting also affects file upload. To upload large files, this value must be larger than upload_max_filesize
post_max_size = 128M
### Keybase proof
I hereby claim:
* I am faghani on github.
* I am faghani (https://keybase.io/faghani) on keybase.
* I have a public key ASD2eIaGa1rq4QWtawf4X7d10MXZQf_WRKk1EMHrqphIsQo
To claim this, I am signing this object:
@faghani
faghani / docker_backup.py
Created April 19, 2019 19:17 — forked from firecat53/docker_backup.py
Backup docker volumes
#!/usr/bin/env python3
"""Backs up and restores data-only volumes to/from host backup directory using
rsync. Only backup named volumes, which is arbitrarily set to ones having a name
length < 40 characters.
1. Create a Docker image containing rsync (named rsync)
https://github.com/firecat53/dockerfiles/tree/master/rsync
``docker build -t rsync .``
@faghani
faghani / pod.yaml
Created December 11, 2018 21:55 — forked from matthewpalmer/pod.yaml
kubernetes nginx php-fpm pod
# Create a pod containing the PHP-FPM application (my-php-app)
# and nginx, each mounting the `shared-files` volume to their
# respective /var/www/html directories.
kind: Pod
apiVersion: v1
metadata:
name: phpfpm-nginx-example
spec:
volumes:
@faghani
faghani / Dockerfile
Created October 31, 2018 14:46 — forked from sandrokeil/Dockerfile
nginx with lua-resty-auto-ssl - On the fly (and free) SSL registration and renewal inside nginx with Let's Encrypt.
FROM alpine:3.5
ENV NGINX_VERSION 1.11.10
ENV LUAROCKS_VERSION 2.4.2
ENV NGX_DEVEL_KIT_VERSION 0.3.0
ENV LUA_NGINX_MODULE_VERSION 0.10.7
# or tell where to find Lua if using Lua instead:
ENV LUA_LIB /usr/lib
ENV LUA_INC /usr/include
@faghani
faghani / gist:5533295
Created May 7, 2013 15:02
Another Hello World :D
<?php
echo "He110 W0r1d!";
@faghani
faghani / hello.php
Created May 7, 2013 15:01
Hello World!
<?php
echo "Hello World!";