Skip to content

Instantly share code, notes, and snippets.

@ray-moncada
ray-moncada / vagrant-hostname-down.sh
Created December 24, 2021 14:30 — forked from gmcclins/vagrant-hostname-down.sh
manage a vagrant host with systemd
#!/usr/bin/env bash
#
# script to stop vagrant box for use with systemd
# place scripts into /usr/lib/systemd/scripts/
# be sure to put the .service file in /lib/systemd/system/
#
# -- Geoffrey McClinsey
VAGRANTUSR=vagrant # user you want vagrant box to run as
VAGRANTBOXPATH= # add path to Vagrantfile
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
ssl_certificate /usr/local/etc/nginx/ssl/{{host}}.crt;
ssl_certificate_key /usr/local/etc/nginx/ssl/{{host}}.key;
ssl_ciphers HIGH:!aNULL:!MD5;
# listen 80;
server_name {{host}};
@ray-moncada
ray-moncada / http_response_code.php
Created February 1, 2022 01:59 — forked from ewwink/http_response_code.php
PHP Class for HTTP Response Status Codes
<?php
/**
* StatusCodes provides named constants for
* HTTP protocol status codes. Written for the
* Recess Framework (http://www.recessframework.com/)
*
* @author Kris Jordan
* @license MIT
* @package recess.http
*
@ray-moncada
ray-moncada / README.md
Created July 20, 2022 22:12 — forked from nichtich/README.md
How to automatically deploy from GitHub

Deploy your site with git

This gist assumes:

  • you have an online remote repository (github / bitbucket etc.)
  • you have a local git repo
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by Apache
  • the Apache user is named www-data (may be apache on other systems)