Skip to content

Instantly share code, notes, and snippets.

View leaguecodeuk's full-sized avatar

League Code leaguecodeuk

  • 12:20 (UTC +05:30)
View GitHub Profile
@leaguecodeuk
leaguecodeuk / GitHub-Action-HostGator.yml
Last active April 22, 2024 11:55
Laravel / PHP / Vue.Js / React.Js : Github Actions for Shared Hosting [ IONOS, HostGator ]
name: HostGatorDeploy
on:
push:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
@leaguecodeuk
leaguecodeuk / deploy.sh
Last active April 20, 2024 09:21 — forked from cagartner/deploy.sh
Laravel Push deploy Github actions example
#!/bin/sh
set -e
vendor/bin/phpunit
(git push) || true
git checkout production
git merge master
@leaguecodeuk
leaguecodeuk / .htaccess
Last active January 14, 2023 20:53
html .htaccess
<IfModule mod_expires.c>
ExpiresActive On
# Images
ExpiresByType image/jpeg "access plus 1 year"
ExpiresByType image/gif "access plus 1 year"
ExpiresByType image/png "access plus 1 year"
ExpiresByType image/webp "access plus 1 year"
ExpiresByType image/svg+xml "access plus 1 year"
ExpiresByType image/x-icon "access plus 1 year"
# Video
@leaguecodeuk
leaguecodeuk / getStatusCode.js
Created December 5, 2022 09:51 — forked from Banhawy/getStatusCode.js
A Google Sheets app script that takes a url and returns the resulting status code from requesting that url
function getStatusCode(url) {
var url_trimmed = url.trim();
// Check if script cache has a cached status code for the given url
var cache = CacheService.getScriptCache();
var result = cache.get(url_trimmed);
// If value is not in cache/or cache is expired fetch a new request to the url
if (!result) {
var options = {
@leaguecodeuk
leaguecodeuk / txt
Created July 14, 2020 19:44
Unknown username "whoopsie" in message bus configuration file
Unknown username "whoopsie" in message bus configuration file (Crouton)
For some time I had this notification "Unknown username 'whoopsie' in message bus configuration file" coming up when I started my Ubuntu-server on my Chromebook via crouton. It seemed not to do anything wrong but hey, I hate to see error messages popping up on the screen and not knowing what it really means.
In my search I've learned that the user 'whoopsie' is being used for the error reporting daemon in Ubuntu.
System Description:
Toshiba Chromebook 2:
Intel® Celeron® Processor N2840
Intel® HD Graphics
4GB DDR3 1600MHz
@leaguecodeuk
leaguecodeuk / bash
Created July 6, 2020 09:07
Bash Style
export PS1='\[\033[0;32m\]@\u:\[\033[0;36m\][\w]\[\033[0;33m\]$(__git_ps1)\[\033[0m\] \n$ '
@leaguecodeuk
leaguecodeuk / disposable-email-provider-domains
Created July 19, 2016 07:32
List of disposable email provider domains
0815.ru
0wnd.net
0wnd.org
10minutemail.co.za
10minutemail.com
123-m.com
1fsdfdsfsdf.tk
1pad.de
20minutemail.com
21cn.com
@leaguecodeuk
leaguecodeuk / 01_Laravel 5 Simple ACL manager_Readme.md
Created July 17, 2016 05:35 — forked from amochohan/01_Laravel 5 Simple ACL manager_Readme.md
Laravel 5 Simple ACL - Protect routes by an account / role type

#Laravel 5 Simple ACL manager

Protect your routes with user roles. Simply add a 'role_id' to the User model, install the roles table and seed if you need some example roles to get going.

If the user has a 'Root' role, then they can perform any actions.

Installation

Simply copy the files across into the appropriate directories, and register the middleware in App\Http\Kernel.php

@leaguecodeuk
leaguecodeuk / Laravel PHP7 LEMP AWS.md
Created May 29, 2016 20:14 — forked from santoshachari/Laravel PHP7 LEMP AWS.md
Laravel 5.x on Ubuntu 14.x, PHP 7.x, Nginx 1.9.x

#Steps to install latest Laravel, LEMP on AWS Ubuntu 14.4 version. This tutorial is the improvised verision of this tutorial on Digitalocean based on my experience.

Install PHP 7 on Ubuntu

Run the following commands in sequence.

sudo apt-get install -y language-pack-en-base
sudo LC_ALL=en_US.UTF-8 add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install zip unzip
@leaguecodeuk
leaguecodeuk / DB.sql
Created May 16, 2016 21:29 — forked from msurguy/DB.sql
Dynamic dropdown in Laravel, let's say you have multiple drop downs (selects), you click on one and the contents of the other need to be dynamically changed. One solution is to dynamically load JSON from the API and change the dropdown dynamically depending on the user choice.
CREATE TABLE `makers` (
`id` int(10) unsigned NOT NULL,
`name` varchar(255) NOT NULL,
`description` varchar(255) NOT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--