Skip to content

Instantly share code, notes, and snippets.

@digitalkreativ
digitalkreativ / windows-xampp-virtualhosts.md
Last active September 19, 2017 14:09
local development setup #dev

Requirements

  • Installation of XAMPP

hosts file

To get your local development started and use url's in your browser to point to locally installed webprojects you need to first add a line to your hosts file

On Windows this should be located at the following path.

@digitalkreativ
digitalkreativ / DbOnTheFly.php
Last active April 11, 2021 10:57
Lumen 5 - On the fly Database connection #lumen
<?php
/*******
* Class based on the OTF class made by @lukevers
* https://lukevers.com/2015/03/25/on-the-fly-database-connections-with-laravel-5
* https://gist.github.com/lukevers/2e40dc2dc0cf4818b1ba#file-otf-php
*/
namespace App\Database;
@digitalkreativ
digitalkreativ / lumen-5-2-storage-facade-and-s3-storage.md
Last active May 15, 2022 07:21
Lumen 5.2 Storage facade and s3 storage #lumen

Lumen 5.2 Storage facade

To enable the Storage facade in Lumen 5.2 you need to modify a few things.

Filesystem configuration file

First of all you need to create a filesystems.php in a config folder.

The config folder needs to be at the same level as your app and bootstrap folder. If it's not there yet just create it.

@digitalkreativ
digitalkreativ / docker-issues.md
Last active April 18, 2019 15:12
Docker links #docker

Errocode 100 on apt-get update

When using the command apt-get update sometimes your file just won't build. Most of the time this is due to the sources used by apt-get not being up-to-date.

The following RUN command can be added if your image is based on debian/jessie

# UPDATE SOURCES 
RUN printf "deb http://archive.debian.org/debian/ jessie main\ndeb-src http://archive.debian.org/debian/ jessie main\ndeb http://security.debian.org jessie/updates main\ndeb-src http://security.debian.org jessie/updates main" > /etc/apt/sources.list
@digitalkreativ
digitalkreativ / .gitignore examples
Last active April 19, 2024 09:00
Git commands #git #dev
# All files excluded
/**
# except gitignore
!.gitignore
# except default folder
!/_default/
# except default sub folders
!/_default/**
@digitalkreativ
digitalkreativ / CustomBuilder.php
Created August 25, 2018 14:00
Laravel Zero adding extra files to the phar build
<?php
// Put this file in app/Commands directory
namespace App\Commands;
use LaravelZero\Framework\Commands\App\Builder;
class CustomBuilder extends Builder
{
@digitalkreativ
digitalkreativ / slow-downloads.md
Last active July 9, 2020 12:17
composer php issues #composer #php

First of all try running your command with the -o -vvv flags. This would show each step in the composer process and you will notice where it slows down.

composer update -o -vvv

If it's showing slowness for http://repo.packagist.org you can try forcing the switch to https

composer config --global repos.packagist composer https://repo.packagist.org

@digitalkreativ
digitalkreativ / calculate.md
Created January 20, 2023 15:33
Calculate excel column #php