Skip to content

Instantly share code, notes, and snippets.

View madalinignisca's full-sized avatar
🏡
Open for business

Madalin Ignisca madalinignisca

🏡
Open for business
View GitHub Profile
@madalinignisca
madalinignisca / ufw.md
Created June 15, 2024 19:19 — forked from kimus/ufw.md
NAT and FORWARD with Ubuntu’s ufw firewall

UFW

I use Ubuntu’s Uncomplicated firewall because it is available on Ubuntu and it's very simple.

Install UFW

if ufw is not installed by default be sure to install it first.

@madalinignisca
madalinignisca / 01_nginx-reload-post-hook.sh
Created January 2, 2024 09:00 — forked from justinhartman/01_nginx-reload-post-hook.sh
Let's Encrypt Certbot post hook command for Nginx which checks the updated configuration files and reloads the server if everything validates.
#!/usr/bin/env bash
#
# Certbot Nginx Reload
#
# Let's Encrypt Certbot post hook command for Nginx which checks the updated
# configuration files and reloads the server if everything validates.
#
# Author : Justin Hartman <code@justinhartman.co>
# Version : 1.0.1
# License : MIT <https://opensource.org/licenses/MIT>
@madalinignisca
madalinignisca / ST_Epgs3857_DWithin.sql
Created November 13, 2023 18:33 — forked from Tylerian/ST_Epgs3857_DWithin.sql
ST_DWithin function implementation for MySQL 8.0
-- Made by Jairo Tylera
-- (github.com/Tylerian)
-- (c) 2019 - present
-- Released under MIT X11 License
CREATE
DEFINER=`root`@`localhost`
FUNCTION
`ST_Epgs3857_DWithin`(p1 POINT, p2 POINT, distance_mts FLOAT)
RETURNS
@madalinignisca
madalinignisca / nextjs-deploy.md
Created November 9, 2023 20:06 — forked from jjcodes78/nextjs-deploy.md
Deploying NEXTJS site with nginx + pm2

How to setup next.js app on nginx with letsencrypt

next.js, nginx, reverse-proxy, ssl

1. Install nginx and letsencrypt

$ sudo apt-get update
$ sudo apt-get install nginx letsencrypt

Also enable nginx in ufw

@madalinignisca
madalinignisca / hddperftest
Last active January 26, 2022 05:00 — forked from frozenice/hddperftest
Storage performance tests on Hetzner
# hel1, CX51, Ubuntu 20.04, 10 GB EXT4 Volume, 240 GB EXT4 Volume
# local NVME
root@ubuntu-32gb-hel1-1:~# hdparm -Tt /dev/sda
/dev/sda:
@madalinignisca
madalinignisca / pritunlMigration.md
Created December 15, 2021 04:42 — forked from makenova/pritunlMigration.md
move pritunl between servers

Migrating your pritunl install between servers

This is a small write up about how to migrate your pritunl install between servers. It's not especially detailed because I'm lazy and your migration story will most likely be different. All this can be avoided by using a remote/hosted mongo instance(compose.io, mongolab, etc.) and simply pointing your pritunl instance at that. If you want more details ask, and I'll do my best to answer and update this write-up accordingly. Also, feel free to criticize my grammar and spelling.

@madalinignisca
madalinignisca / 00_twill_vuejs_custom_components_workflow.md
Created October 30, 2021 06:19
Twill Vue.js Components Workflow

Vue.js Workflow - Creating custom components, form fields and blocks in Twill

Objectives:

  • Get an overview of Twill's Artisan commands for development — Part 1
  • Create a custom Vue.js component — Part 2
  • Create a custom Twill form field — Part 3
  • Create a custom Twill block — Part 4
@madalinignisca
madalinignisca / docker-volume-funcs.sh
Created February 4, 2018 11:40 — forked from DALDEI/docker-volume-funcs.sh
Backup/Restore Docker Volumes
# backup files from a docker volume into /tmp/backup.tar.gz
# from http://stackoverflow.com/questions/21597463/how-to-port-data-only-volumes-from-one-host-to-another
function docker-volume-backup-compressed() {
docker run --rm -v /tmp:/backup --volumes-from "$1" debian:jessie tar -czvf /backup/backup.tar.gz "${@:2}"
}
# restore files from /tmp/backup.tar.gz into a docker volume
function docker-volume-restore-compressed() {
docker run --rm -v /tmp:/backup --volumes-from "$1" debian:jessie tar -xzvf /backup/backup.tar.gz "${@:2}"
echo "Double checking files..."
docker run --rm -v /tmp:/backup --volumes-from "$1" debian:jessie ls -lh "${@:2}"
@madalinignisca
madalinignisca / post-receive
Created August 10, 2016 07:03
git post-merge hook : update / install composer packages & composer itself
#!/bin/bash
# thanks http://www.jenssegers.be/blog/46/deploying-websites-with-git-and-composer-
# replace folder
cd "`dirname $0`/../../application/config"
# Check if a composer.json file is present
if [ -f composer.json ]; then
@madalinignisca
madalinignisca / readme.markdown
Last active August 24, 2022 06:10 — forked from larrybotha/readme.markdown
Postfix Using Mailhog to capture email for web development

Configure Postfix for Localhost SMTP in Mac OSX Mavericks with Mailhog

Using Homebrew install mailhog and enable the service as instructed in the installation.

Open in any browser http://localhost:8025

Edit file /etc/postfix/main.cf

sudo vim /etc/postfix/main.cf