Skip to content

Instantly share code, notes, and snippets.

Loving Linux

J. Alexander Curtis jacurtis

Loving Linux
Block or report user

Report or block jacurtis

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
jacurtis /
Created Apr 27, 2019 — forked from radermacher/
Laravel Forge Setup Script
# - server (the forge server instance)
# - event (the forge event instance)
# - sudo_password (random password for sudo)
# - db_password (random password for database user)
# - callback (the callback URL)
jacurtis /
Last active May 3, 2019
The techniques I use to name cloud servers.


  • dev - Development
  • tst - Testing
  • stg - Staging
  • prd - Production
jacurtis / no-right-click-on-images.js
Last active Nov 25, 2019
Removes right-click on images
View no-right-click-on-images.js
* This script will look for all images on a page and prevent right clicking on an image.
const images = document.getElementsByTagName('img');
for(var i = 0; i < images.length; i++) {
images[i].addEventListener('contextmenu', event => event.preventDefault());
// Note: I threw this script together as requested by a subscriber. I personally don't recommend doing
jacurtis / _media-queries.scss
Last active Jul 31, 2019
This will generate media query mixins with SCSS.
View _media-queries.scss
$mobile: 768px !default;
$tablet: 769px !default;
$desktop: 1024px !default;
$widescreen: 1216px !default;
$fullhd: 1408px !default;
// Mobile Devices Only
// (0 - 768px)
@mixin mobile {
@media only screen and (max-width: $mobile) {
jacurtis / Directus-Nginx.conf
Created Jan 28, 2019
Configuration file for Nginx Directus Site.
View Directus-Nginx.conf
include forge-conf/*;
server {
root /home/forge/;
index index.php index.html index.htm;
# ssl_certificate;
jacurtis / phpcs.xml
Created Jan 26, 2019
The PHP Code Sniffer configuration file I use for Laravel Applications. I had to remove PSR2 code just because it causes lots of problems with magic function in route files and models and stuff. But otherwise a good basic code sniffer config to use in Laravel projects.
View phpcs.xml
<?xml version="1.0"?>
<ruleset name="Laravel Standards">
<description>Laravel Coding Standards</description>
<rule ref="Generic.Classes.DuplicateClassName"/>
<rule ref="Generic.CodeAnalysis.EmptyStatement"/>
<rule ref="Generic.CodeAnalysis.ForLoopShouldBeWhileLoop"/>
<rule ref="Generic.CodeAnalysis.JumbledIncrementer"/>
<rule ref="Generic.CodeAnalysis.UnconditionalIfStatement"/>
jacurtis / mysql-cli.sql
Created Jan 26, 2019
This is the command I use to create all of my new MySQL databases in the CLI. Insert your own database name. This sets up new databases using the utf8mb4 character set in the most popular method.
View mysql-cli.sql
CREATE DATABASE <database_name> CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
jacurtis / atom-styles.less
Created Dec 12, 2018
This is the stylesheet I use in Atom to get the design I like. It requires Fira Code (mono font) and FlottFlott (ligature font). But you can swap out your own fonts by replacing them in the sheet.
View atom-styles.less
* Your Stylesheet
* This stylesheet is loaded when Atom starts up and is reloaded automatically
* when it is changed and saved.
* Add your own CSS or Less to fully customize Atom.
* If you are unfamiliar with Less, you can read more about it here:
jacurtis / Reserved-Subdomains.json
Last active Mar 3, 2019
This is a JSON (or compatible with most language arrays) array that contains a list of subdomains that you want to reserve in multi-tentant applications.
View Reserved-Subdomains.json
jacurtis / toast-notifications.blade.php
Last active Feb 16, 2020
Self Contained Vue.js Instance to Manage LaraFlash Notifications in Laravel
View toast-notifications.blade.php
This makes a great "partial" to add to your template layout file. It will self manage your
notifications so you do not need to worry about displaying them. Simply just add notifications
using LaraFlash (Laravel Package) in your controllers, and they will display intelligently
and elegantly into your views.
Simply use an @include statement in your main template/layout file to this partial so that
this partial is included with every view. The rest can be set once and forgotten.
You can’t perform that action at this time.