Skip to content

Instantly share code, notes, and snippets.

View rbrisita's full-sized avatar

Robert Brisita rbrisita

View GitHub Profile
@rbrisita
rbrisita / prepare_sh.sb
Created March 23, 2022 19:17
OS X Isolated Shell
;
; Prepares a shell for the current working directory with file and directory commands.
; Tested on Mac OS X 10.13.6
; sandbox-exec -D TTY=$(tty) -D CWD=$(pwd) -f prepare_sh.sb /bin/sh
;
(version 1)
(deny default)
; Allow commands to fork.
(allow process-fork)
@rbrisita
rbrisita / install_angular.sh
Created April 22, 2019 23:06
Install Angular into a new Laravel project using Laravel Mix.
#!/usr/bin/env bash
#
# Author: Robert Brisita <[first-initial][last name] at gmail dot com>
#
# An Angular installation script for a Laravel project.
# This should be run on a new Laravel project install.
#
# Tested on Mac OS X 10.13.6
#
/* */
/* debug Bootstrap 3 grid by Andre Firchow */
/* */
/* */
.debug-output, body:before, [class*="col-"]:after, [class*="col-"]:before {
content: "";
position: absolute;
top: 1px;
right: 1px;
font-size: 10px;
@rbrisita
rbrisita / geo-coordinates_place-value.txt
Created May 18, 2018 21:18
This file explains the the significance of a digit's value placement of a geo-coordinate in meters.
Explains the the significance of a digit's value placement in meters.
0,0 is where the equator and the meridian line meet.
+/-180° to create a full circle.
+/-XYZ.ABCDEFGHIJ
+/- North/South, East/West according to the equator and the meridian line.
X Non-zero tell us we are using Longitude.
Y Position to about 1000km - Continent or Ocean location.
@rbrisita
rbrisita / install_ssl.sh
Created August 21, 2017 23:52
Automatically register, authenticate, and install SSL certificates on Ubuntu with Nginx using Certbot.
#!/usr/bin/env bash
echo -e "\n*****\n* Generating Diffie-Hellman parameters for better security.\n*****\n"
# Add Diffie-Hellman parameters.
# Create secure Diffie-Hellman parameters.
sudo openssl dhparam -out /etc/ssl/certs/dhparam.pem 2048
NGINX_CONF="/etc/nginx/sites-available/default"
@rbrisita
rbrisita / mysql_credentials.cnf
Created August 16, 2017 16:31
MySQL credentials file to allow non-interactive MySQL installation.
[client]
user =
password =
@rbrisita
rbrisita / ni-msi.sh
Created August 16, 2017 16:26
A non-interactive replacement for mysql_secure_installation.
#! /bin/sh
#
# Author: Bert Van Vreckem <[email protected]>
#
# A non-interactive replacement for mysql_secure_installation
#
# Tested on CentOS 6, CentOS 7, Ubuntu 12.04 LTS (Precise Pangolin), Ubuntu
# 14.04 LTS (Trusty Tahr).
#
# Slighlty modified for MySQL 5.7 - Robert Brisita <[first-initial][last name] at gmail dot com>
@rbrisita
rbrisita / azure_article_install.sh
Created August 16, 2017 16:22
A non-interactive installation script for a Nginx Laravel application using MySQL on Ubuntu 16.04 LTS.
#!/usr/bin/env bash
#
# Author: Robert Brisita <[first-initial][last name] at gmail dot com>
#
# A non-interactive installation script for a Nginx Laravel application using MySQL.
#
# Tested on Ubuntu 16.04 LTS
#####
# Project details
@rbrisita
rbrisita / reassign_constant.playground
Last active November 21, 2015 21:46
Swift reassign of constant value.
var optionalString:String? = nil
optionalString = "Temp"
let constantString = "No"
if let constantString = optionalString
{
print("The string's value is: \(constantString)")
}
print("constantString is \(constantString)")
@rbrisita
rbrisita / my.cnf
Created February 20, 2015 21:14
MySQL 5.6 Slow Query Log Example
# Give write permissions to the other group for log file.
slow_query_log = 1
slow_query_log_file = /var/log/mysql/slow.log
long_query_time = 10
log_queries_not_using_indexes = 1