Skip to content

Instantly share code, notes, and snippets.

View b4oshany's full-sized avatar

Oshane Bailey b4oshany

View GitHub Profile
@b4oshany
b4oshany / opt.css
Last active April 1, 2024 14:28
Tutor LMS icons
.ct-header > .container,
.footer-custom-inner > .container,
.tutor-wrap.tutor-dashboard > .tutor-container {
padding-left: 200px !important;
}
@media only screen and (max-width: 1400px) {
.tutor-wrap.tutor-dashboard {
padding-left: 200px !important;
@b4oshany
b4oshany / sql_import.php
Created January 9, 2015 05:27
PHP PDO sql file import.
<?php
namespace libs\mysql;
class PDODbImporter{
private static $keywords = array(
'ALTER', 'CREATE', 'DELETE', 'DROP', 'INSERT',
'REPLACE', 'SELECT', 'SET', 'TRUNCATE', 'UPDATE', 'USE',
'DELIMITER', 'END'
);
@b4oshany
b4oshany / discourse-api.php
Created October 8, 2020 10:28
Discourse API - Generate new topics, posts and PM
<?php
header('Content-Type: application/json');
//Make sure that it is a POST request.
if (strcasecmp($_SERVER['REQUEST_METHOD'], 'POST') != 0) {
echo json_encode(array("error" => 'Request method must be POST!'));
}
//Make sure that the content type of the POST request has been set to application/json
$contentType = isset($_SERVER["CONTENT_TYPE"]) ? trim($_SERVER["CONTENT_TYPE"]) : '';
@b4oshany
b4oshany / chrome.robot
Created May 26, 2018 02:21
Python Robot Framework with Headless Chrome Setup and Robot Files
*** Keywords ***
Open Chrome
[Arguments] ${url}
${chrome_options}= Evaluate sys.modules['selenium.webdriver'].ChromeOptions() sys, selenium.webdriver
Call Method ${chrome_options} add_argument --disable-extensions
Call Method ${chrome_options} add_argument --headless
Call Method ${chrome_options} add_argument --disable-gpu
Call Method ${chrome_options} add_argument --no-sandbox
Create Webdriver Chrome chrome_options=${chrome_options}
@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 / bk2spaces.sh
Created August 29, 2021 13:50
Backup to spaces
#!/bin/bash
DATETIME=`date +%y%m%d-%H_%M_%S`
SRC=$1
DST=$2
GIVENNAME=$3
showhelp(){
echo "\n\n############################################"
echo "# bkupscript.sh #"
echo "############################################"
@b4oshany
b4oshany / floralapi.json
Created July 18, 2021 20:53
floralapi.json
This file has been truncated, but you can view the full file.
{
"list": [
{
"manufacturerkey": 7349,
"lotpic": "",
"processedTimestamp": "2021-06-29 12:31:49.0",
"pic": "https%3A%2F%2Fapi.floriday.io%2Fimages%2F8e7d6d5e-b294-4019-889c-98b8ba64ca9e.jpg%3Fbid%3D87137825484871573268133232",
"moq": 6,
"MultiplePrices": 1,
"articlespecification": "",
@b4oshany
b4oshany / seekuur-company-jobs.json
Last active July 9, 2021 20:19
List of Jobs for a paritcular ompany on Seekuur
{
"data": [
{
"id": 42,
"job_title": "Welding Machine Setter",
"job_url": "https:\/\/devjl.osoobe.com\/job\/welding-machine-setter61",
"apply_post_url": "https:\/\/devjl.osoobe.com\/email\/apply\/welding-machine-setter61",
"job_slug": "welding-machine-setter61",
"company": {
"company_id": 1,
@b4oshany
b4oshany / docker-compose.yml
Created June 15, 2021 13:40
Laravel Docker Compose
version: '3.3'
services:
web:
image: jamaicandevelopers/laravel-nginx-apline:php7.2
ports:
- '18481:80'
- '18482:81'
restart: unless-stopped
volumes:
@b4oshany
b4oshany / .docker.env
Last active November 16, 2020 12:51
Laravel .docker.env
APP_NAME="Task App"
APP_ENV=${APP_ENV}
APP_KEY=base64:+m0h+ObGNu26eF4MVCgqX1ua0IukSUn7lRYInflNt8A=
APP_DEBUG=${APP_DEBUG}
APP_URL=${APP_URL}
APP_TIMEZONE=America/Jamaica
APP_LOCALE=en
LOG_CHANNEL=stack