Skip to content

Instantly share code, notes, and snippets.

View b4oshany's full-sized avatar

Oshane Bailey b4oshany

View GitHub Profile
@b4oshany
b4oshany / installLaravel.sh
Last active July 25, 2020 16:02
Install Laravel and its PHP dependencies
sudo apt install openssl php-common php-curl php-json php-mbstring php-mysql php-xml php-zip -y
sudo apt install composer -y
composer global require laravel/installer
@b4oshany
b4oshany / docker-compose.yml
Created July 2, 2020 18:33
Docker Compose Robot test
version: '3.3'
services:
test:
network_mode: host
image: registry.gitlab.com/genesysjm/sms-robot-test
shm_size: "256M"
environment:
USERNAME: Oshane Bailey
@b4oshany
b4oshany / php-extens.sh
Created June 16, 2020 18:28
School Management System
sudo apt-get install -y php-dom
sudo apt-get install -y php-mbstring
sudo apt-get install -y php-gd
@b4oshany
b4oshany / installDockerCompose.sh
Last active April 14, 2020 21:12
Upgrade Docker Compose
#!/bin/bash
sudo apt-get remove docker-compose -y
sudo rm -f /usr/local/bin/docker-compose
sudo rm -f /usr/bin/docker-compose
pip uninstall docker-compose
sudo apt-get install -y jq
VERSION=$(curl --silent https://api.github.com/repos/docker/compose/releases/latest | jq .name -r)
DESTINATION=/usr/bin/docker-compose
@b4oshany
b4oshany / docker-compose.yml
Last active March 27, 2020 11:50
Nginx + Postgres + RabbitMQ + PgAdmin + other app
version: '3.7'
services:
# App service
app:
build: .
restart: always
container_name: app
volumes:
@b4oshany
b4oshany / docker-compose.yml
Created March 27, 2020 11:36
RabbitMQ + other app
version: '3.7'
services:
# App service
app:
build: .
restart: always
container_name: app
volumes:
@b4oshany
b4oshany / kotti_self_join.py
Created March 24, 2020 20:38
Kotti self join
from kotti.resources import Content
from sqlalchemy.orm import aliased
parent_table = aliased(Content)
# Perform a self join with a where query, which adds the
# following line::
# left join contents as n on contents.id = n.id
@b4oshany
b4oshany / nginx-icd11.conf
Created February 25, 2020 02:52
Nginx ICD11
user nginx;
worker_processes 1;
error_log /var/log/nginx/errora.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 4096;
@b4oshany
b4oshany / export-content.py
Created January 7, 2020 10:26
Plone Exporter
import argparse
import base64
import errno
import logging
import time
import os
import re
from datetime import datetime
from fnmatch import fnmatch
from StringIO import StringIO
@b4oshany
b4oshany / fix-docker-login.sh
Created August 24, 2019 07:19
Fix docker login fails on a server with no X11 installed
sudo apt install gnupg2 pass -y
gpg2 --full-generate-key
pass init "whatever key id you have"