Skip to content

Instantly share code, notes, and snippets.

drbyte / config.referral_tracking.php
Created December 11, 2023 22:48
Coupon/ReferralCode Tracking / auto-apply in Zen Cart
$autoLoadConfig[100][] = array('autoType'=>'init_script',
'loadFile'=> 'init_referral_tracking.php');
drbyte /
Created January 14, 2021 17:18

Keybase proof

I hereby claim:

  • I am drbyte on github.
  • I am drbyte ( on keybase.
  • I have a public key ASDMu4L2lyvJ_WV0dPjk8FnquqW9fU13W2ufxphqLcX3QQo

To claim this, I am signing this object:

drbyte / change ckeditor from google api to jquery
Last active June 16, 2020 21:44
ckeditor fix for very old implementations
Look at your /admin/includes/ckeditor.php file
<script type="text/javascript" src="<?php echo (strstr(HTTP_SERVER, 'ttps:') ? 'https' : 'http'); ?>://"></script>
<script type="text/javascript">if (typeof jQuery == 'undefined') google.load("jquery", "1");</script>
<script>window.jQuery || document.write('<script src="" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous"><\/script>');</script>
drbyte /
Created May 23, 2020 03:51
Dusk Chrome Update bash script MacOS
# unzip
# mv chromedriver /vendor/laravel/dusk/bin/chromedriver-mac
if [ ! -f "./vendor/laravel/dusk/bin/chromedriver-mac" ]; then echo 'No Dusk Dir.' && exit 1; fi
a=$(uname -m) &&
rm -r ~/Downloads/chromedriver/
drbyte /
Created April 5, 2019 18:28 — forked from vicgonvt/
Deployment Guide for Ubuntu Server from Scratch with Laravel

Setting Up Laravel in Ubuntu / DigitalOcean

Getting Started

  • Create droplet with Ubuntu 18.10
  • ssh root@[DROPLET IP ADDRESS]
  • Get password from your email
  • Change password on first login
  • adduser laravel
  • Enter password and other information
namespace App\Notifications;
use App\Helpers\RemembersLocale;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Notification;
use Notifications\Channels\FirebaseChannel;
drbyte / valet.conf
Created October 18, 2017 16:23 — forked from poul-kg/valet.conf
CORS Rules for Laravel Valet Nginx
# To enable CORS you should add lines with CORS rules below to your valet.conf file
# Find the file /usr/local/etc/nginx/valet/valet.conf - this is Valet conf for Nginx
# of try to execute `locate valet.conf` and find the `valet.coinf` in `nginx` subdirectory
# after you edit your valet.conf do not forget to execute `valet restart`
server {
listen 80 default_server;
root /;
charset utf-8;
client_max_body_size 128M;
drbyte / in-memory-sqlite-database.php
Created September 27, 2017 00:18 — forked from reinink/in-memory-sqlite-database.php
Give users completely safe sandboxed raw SQL reporting abilities
// Create in-memory SQLite database
$sqlite = new PDO('sqlite::memory:');
// Generate schema (for whatever tables you want)
$sqlite->prepare('CREATE TABLE users(id, family_id, first_name, last_name, email)')->execute();
$sqlite->prepare('CREATE TABLE families(id, name, phone, address)')->execute();
// Insert pre-defined data
drbyte / .htaccess
Created September 2, 2017 15:42
.well-known rewrites for apache
# ----------------------------------------------------------------------
# Put well known resources in the .well-known folder
# ----------------------------------------------------------------------
RewriteCond %{REQUEST_FILENAME} !-f
# Some very common, then less common "well-known" patterns
RewriteCond %{REQUEST_URI} =/favicon.jpg [OR]
RewriteCond %{REQUEST_URI} =/favicon.ico [OR]
# app/Validation/AllowedUsernameValidator.php
namespace App\Validation;
use Illuminate\Filesystem\Filesystem;
use Illuminate\Routing\Router;
use Illuminate\Config\Repository;