Skip to content

Instantly share code, notes, and snippets.

Vincent van Daal vvdaal

Block or report user

Report or block vvdaal

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@vvdaal
vvdaal / create_user_lemp.sh
Last active Sep 16, 2018
Script for creating a user specific pool/docroot structure/nginx config and database + user. Can be used in combination with my lemp.txt script.
View create_user_lemp.sh
#!/bin/bash
#
# Author: Vincent van Daal
# Website: https://vandaal.io / https://gist.github.com/vvdaal/54fcb7dbaded56dd076b8c812fe5b645
#
#
# Requires mkpasswd (inside whois package) and makepasswd. To install: sudo apt-get install mkpasswd makepasswd
# Assumes you're using the Sury Nginx / PHP 7.2 repo (See https://gist.github.com/vvdaal/cd3050b244885e473f424e5593a7f095)
#
@vvdaal
vvdaal / lemp.txt
Last active Sep 15, 2018
Install LEMP - Nginx, PHP7.2 and useful modules, MariaDB 10.3 (tested on Ubuntu 18.04) - Uses Sury Repo's
View lemp.txt
sudo apt-get install -y software-properties-common
sudo add-apt-repository ppa:ondrej/nginx-mainline
sudo add-apt-repository ppa:ondrej/php
sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8
sudo add-apt-repository 'deb [arch=amd64,arm64,ppc64el] http://mirror.i3d.net/pub/mariadb/repo/10.3/ubuntu bionic main'
sudo apt-get update
sudo apt-get install -y nginx zip unzip php7.2 php7.2-cli php7.2-mysql php7.2-fpm php7.2-mbstring php7.2-xml php7.2-curl php7.2-apcu php7.2-pdo php7.2-gd php7.2-imagick composer mariadb-server mariadb-client
mysql_secure_installation
@vvdaal
vvdaal / gist:6a0c699c7f160801c22822b539d6df95
Created Sep 11, 2018
Rewrite rules for Nginx to get CakePHP to work with complicated paths / parameters
View gist:6a0c699c7f160801c22822b539d6df95
# This assumes that the actual docroot points to the public_html and inside the public_html the app/webroot resides.
# In this specific case the customer had a "index.php" under public_html that was also used by some things.
# We noticed that if you use just "$args" some complicated paths such as asset_compress didn't work.
location / {
try_files $uri $uri/ /app/webroot/$uri /app/webroot/$uri/ /app/webroot/index.php$is_args$args;
}
View keybase.md

Keybase proof

I hereby claim:

  • I am vvdaal on github.
  • I am vvandaal (https://keybase.io/vvandaal) on keybase.
  • I have a public key whose fingerprint is 0545 6E9F 1C9A D344 5FEF 5930 BE2A 03FE 5A69 8CC6

To claim this, I am signing this object:

@vvdaal
vvdaal / firewall.sh
Last active May 12, 2018
Firewall script - Setups very restrictive firewall IPv4 and IPv6
View firewall.sh
#!/bin/bash
IPT="/sbin/iptables"
IPV6=true
IPTV6="/sbin/ip6tables"
# Your DNS servers you use: cat /etc/resolv.conf
# IPv6 DNS not supported in this script
DNS_SERVER="67.207.67.3 67.207.67.2"
# Allow connections to this package servers
View keybase.md

Keybase proof

I hereby claim:

  • I am vincentvandaal on github.
  • I am vvandaal (https://keybase.io/vvandaal) on keybase.
  • I have a public key whose fingerprint is 0545 6E9F 1C9A D344 5FEF 5930 BE2A 03FE 5A69 8CC6

To claim this, I am signing this object:

@vvdaal
vvdaal / encode.sh
Last active Jul 15, 2016 — forked from donmelton/encode.sh
This is the shell script I use to drive HandBrakeCLI to re-encode video files in a format suitable for playback on Apple TV, Roku 3, iOS, OS X, etc.
View encode.sh
#!/bin/bash
# encode.sh
#
# Copyright (c) 2013 Don Melton
#
# This version published on June 7, 2013.
#
# Re-encode video files in a format suitable for playback on Apple TV, Roku 3,
# iOS, OS X, etc.
View cloudinit-transcoding-server
#cloud-config
package_update: true
package_upgrade: true
apt_sources:
- source: "ppa:stebbins/handbrake-releases"
# Custom apt repository:
- source: deb http://mkvtoolnix.download/ubuntu/trusty/ ./
key: | # The value needs to start with -----BEGIN PGP PUBLIC KEY BLOCK-----
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v2
View index.html
<!doctype html>
<html>
<head>
<title>MySQL user generator</title>
<style>
body, html {
background-color: #E3E3E3;
font: normal normal normal 1em Arial, sans-serif;
}
label {
@vvdaal
vvdaal / multicheck.sh
Last active Aug 20, 2018
Performs a ping, traceroute, nslookup and telnet (port 80 and 21) Usage: ./multicheck.sh www.site_to_check.com 2>&1 | tee multicheck.log
View multicheck.sh
#!/bin/bash
echo "********************************************************"
echo "BEGINNING PING TO $1"
echo "********************************************************"
echo "Command: ping -c 10 $1"
ping -c 10 $1
wait
echo "********************************************************"
echo "BEGINNING NSLOOKUP TO $1"
echo "********************************************************"
You can’t perform that action at this time.