Skip to content

Instantly share code, notes, and snippets.

View kenmoini's full-sized avatar
⚙️
OPENSHIFTING IT INTO HIGH GEAR

Ken Moini kenmoini

⚙️
OPENSHIFTING IT INTO HIGH GEAR
View GitHub Profile
@kenmoini
kenmoini / 1_dmz-provisioner.sh
Last active October 12, 2018 21:15
Disconnected DevSecOps with Red Hat OpenShift Container Platform
#!/bin/bash
LOCAL_REPO_PATH="/opt/repos"
# This script enables the needed RHEL, OpenShift, Gluster, Ansible, HA, and additional repos needed to mirror them locally.
# The locally created mirror can then be used to deploy OCP into a disconnected environment.
#===== PRE-RUN NOTES:
# This assumes you've already registered and subscribed to the needed OpenShift, Gluster, Ansible, and RHEL subscriptions.
@kenmoini
kenmoini / fix-wordpress-permissions.sh
Created November 25, 2018 05:28 — forked from Adirael/fix-wordpress-permissions.sh
Fix wordpress file permissions
#!/bin/bash
#
# This script configures WordPress file permissions based on recommendations
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions
#
# Author: Michael Conigliaro <mike [at] conigliaro [dot] org>
#
WP_OWNER=www-data # <-- wordpress owner
WP_GROUP=www-data # <-- wordpress group
WP_ROOT=$1 # <-- wordpress root directory
@kenmoini
kenmoini / installLaravelOnFedora.sh
Last active January 12, 2019 21:35
installLaravelOnFedora.sh
#!/bin/bash
DOMAIN="dev.denovo.press"
TEST_DOMAIN="dev.denovo.test"
USERNAME=$(whoami)
sudo dnf install composer php-openssl php-pdo php-mbstring php-xml php-json php-bcmath php-ctype php-tokenizer mariadb-server mariadb nginx
sudo mkdir -p /var/www/$DOMAIN
sudo chown $USERNAME:$USERNAME /var/www/$DOMAIN
@kenmoini
kenmoini / installLaravelOnUbuntu18LTS.sh
Last active September 2, 2019 07:40
Set up an Ubuntu 18.04 LTS system as close to as possible to a base Laravel Homestead configuration (no go/wp-cli/etc just stuff for Laravel)
#!/bin/bash
# Install...
## Git
## nginx
## composer
## Redis
## MariaDB
## Memcached
sudo apt-get install git nginx mariadb-server mariadb-client composer curl ufw redis-server memcached -y
@kenmoini
kenmoini / php.ini
Created January 13, 2019 19:58
PHP 7.2 FPM Config
[PHP]
engine = On
short_open_tag = Off
precision = 14
output_buffering = 4096
zlib.output_compression = Off
implicit_flush = Off
unserialize_callback_func =
serialize_precision = -1
disable_functions = pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
@kenmoini
kenmoini / nginx.conf
Created January 13, 2019 20:07
Nginx Config on Ubuntu 18 LTS
user www-data;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;
events {
worker_connections 1024;
multi_accept on;
}
@kenmoini
kenmoini / default
Last active January 13, 2019 20:21
Nginx default configuration with some adjustments for Laravel+Wordpress+PHP
upstream php {
server unix:/run/php/php7.2-fpm.sock;
}
server {
listen 80 default_server;
listen [::]:80 default_server;
root /var/www/html;
index index.php index.html index.htm index.nginx-debian.html;
server_name _;
location / {
@kenmoini
kenmoini / ICS.php
Last active November 4, 2024 07:34 — forked from jakebellacera/ICS.php
A convenient script to generate iCalendar (.ics) files on the fly in PHP.
<?php
/**
* ICS.php
* =======
* Use this class to create an .ics file.
*
* Usage
* -----
* Basic usage - generate ics file contents (see below for available properties):
@kenmoini
kenmoini / k8s-nginx-ingress-notes
Created July 16, 2019 02:47
K8s nginx Ingress Notes
NOTES:
The nginx-ingress controller has been installed.
It may take a few minutes for the LoadBalancer IP to be available.
You can watch the status by running 'kubectl --namespace default get services -o wide -w ingress-nginx-ingress-controller'
An example Ingress that makes use of the controller:
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
@kenmoini
kenmoini / server.js
Last active October 9, 2019 20:31
RAWR Partner Portal API Server Excerpt - A demonstration of one of the Node.js Express based API microservices used in RAWR. A number of routes have been truncated for privacy and security reason, and proper operation will still require the Dockerfile, Jenkinsfile, package.json and .env files, other routes for this service, as well as the Auth0 …
/*
NOTE: This file has been truncated
RAWR Partner Portal API Server Excerpt - A demonstration of one of the Node.js Express based API microservices used in RAWR.
A number of routes have been truncated for privacy and security reason, and proper operation will still require the Dockerfile, Jenkinsfile, package.json and .env files, other routes for this service, as well as the Auth0 application stack configured as needed, and other microservices used in the K8s/OCP cluster.
Fierce Software - RAWR Partner Portal API Server (rawr-partner-fe-api)
The Rapid Analytic Web Resource (RAWR) extends some functionality to our vendor partners
This service relies on Auth0, AWS SQS, and the following supplimentary Laravel Lumen services:
- rawr-partner-be-get-analytics
- rawr-partner-be-get-authentication