Skip to content

Instantly share code, notes, and snippets.

Avatar

Oshane Bailey b4oshany

View GitHub Profile
@b4oshany
b4oshany / installLaravel.sh
Last active Jul 25, 2020
Install Laravel and its PHP dependencies
View installLaravel.sh
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 Jul 2, 2020
Docker Compose Robot test
View docker-compose.yml
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 Jun 16, 2020
School Management System
View php-extens.sh
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 Apr 14, 2020
Upgrade Docker Compose
View installDockerCompose.sh
#!/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 Mar 27, 2020
Nginx + Postgres + RabbitMQ + PgAdmin + other app
View docker-compose.yml
version: '3.7'
services:
# App service
app:
build: .
restart: always
container_name: app
volumes:
@b4oshany
b4oshany / docker-compose.yml
Created Mar 27, 2020
RabbitMQ + other app
View docker-compose.yml
version: '3.7'
services:
# App service
app:
build: .
restart: always
container_name: app
volumes:
View kotti_self_join.py
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
View nginx-icd11.conf
user nginx;
worker_processes 1;
error_log /var/log/nginx/errora.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 4096;
View export-content.py
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 Aug 24, 2019
Fix docker login fails on a server with no X11 installed
View fix-docker-login.sh
sudo apt install gnupg2 pass -y
gpg2 --full-generate-key
pass init "whatever key id you have"