Skip to content

Instantly share code, notes, and snippets.


Dan Storm Repox

View GitHub Profile
Repox / da.json
Created Jan 11, 2022
Laravel 8.x - Danish Jetstream, Fortify and Livewire translation file
View da.json
"Name": "Navn",
"Email": "E-mail adresse",
"Password": "Kodeord",
"Confirm Password": "Bekræft Kodeord",
"Already registered?": "Allerede registreret?",
"Register": "Opret",
"Remember me": "Husk mig",
"Forgot your password?": "Glemt dit kodeord?",
"Log in": "Log ind",
Repox /
Last active Aug 15, 2022
Laravel 7 - Alternative public folder for shared hosting

The point of this Gist is to help setting up Laravel on a shared hosting setup, where you'd might need to have your ./public folder in another structure due to the hosting setup, but still keep the application itself out of the document root/public html folder.

The directory structure presented below is just an example, showing the document root/public html folder next to the Laravel application. The configurations displayed in the files below matches this structure.

Additionally, the changes in server.php allows for you to have the same directory structure when working locally with artisan serve (if you are using this).

I've added // comments in the files below on the lines where I changed any references and I've marked, in the tree structure below, where you find the files you need to update.

shared_hosting/ <- Your root directory (not document root/public html folder).
Repox / iban.js
Last active Jun 20, 2019
IBAN Converter
View iban.js
var BigNumber = require('big-number');
function convertToIBAN(countryCode, ...numberStrings) {
if(countryCode.length != 2) {
return Error("Parameter `countryCode` must contain a ISO 3166-1 alpha-2 value");
let lettersArray = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'.split("")
let codeMap = {}
Repox / send.php
Created Apr 12, 2018
Google API PHP Client - Firebase Cloud Messaging Service v1 example
View send.php
* This serves as an example of how to use the Google API PHP Client
* with Firebase Cloud Messaging Service.
* The client can be found here:
* At the time of writing this, there's no Service object for the correct
Repox / PaginationController.php
Created Nov 3, 2016
Laravel 5 Pagination with transform
View PaginationController.php
namespace App\Http\Controllers;
use App\User;
use Illuminate\Http\Request;
class PaginationController extends Controller
Repox /
Created Apr 27, 2016
Shell script for adding swap to Linux
# size of swapfile in megabytes
# does the swap file already exist?
grep -q "swapfile" /etc/fstab
# if not then create it
if [ $? -ne 0 ]; then
Repox / laravel
Created Aug 18, 2014
Laravel logrotate configuration (1 daily rotation, 7 days retention)
View laravel
/home/laravel/app/storage/logs/laravel.log {
rotate 7
maxage 7
create 755 user group
su user group
View issetOr
function issetOr(&$first, $alternative = NULL)
$output = '';
if (isset($first)) {
$output = $first;
} else {
$output = $alternative;