Skip to content

Instantly share code, notes, and snippets.

View Assimilationstheorie's full-sized avatar
🥥
Focusing

Konstantin Assimilationstheorie

🥥
Focusing
  • LeafHouse
  • Hamburg, Germany
View GitHub Profile
@Assimilationstheorie
Assimilationstheorie / gist:aaad3578a4b15b1e6b181969a8850415
Created September 7, 2019 16:43
DDEV Mailhog <3 Laravel Config
MAIL_DRIVER=smtp
MAIL_HOST=localhost
MAIL_PORT=1025
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
DB_CONNECTION=mysql
DB_HOST=db
DB_PORT=3306
DB_DATABASE=db
DB_USERNAME=db
DB_PASSWORD=db
@Assimilationstheorie
Assimilationstheorie / gist:378defefac07b40f6fcb70091ad5fdf9
Created June 23, 2019 19:25
Install WordPress with DDEV - Simple Installscript
#!/bin/bash
read -r -p "Install WordPress with DDEV? [y/n]" response
if [[ "$response" = "y" ]]
then
echo "$(tput setaf 1)Install WordPress...$(tput sgr0)"
ddev config --project-type=php
ddev composer create wordpress/skeleton --no-interaction --prefer-dist
ddev config --docroot=wp --project-type=wordpress
ddev restart
fi
@Assimilationstheorie
Assimilationstheorie / gist:6bcdb481094a5b30e8c5b7da76673079
Created September 15, 2017 10:03
Codeigniter - Auto base_url()
define('APP_URL', ($_SERVER['SERVER_PORT'] == 443 ? 'https' : 'http') . "://{$_SERVER['SERVER_NAME']}".str_replace(basename($_SERVER['SCRIPT_NAME']),"",$_SERVER['SCRIPT_NAME']));
@Assimilationstheorie
Assimilationstheorie / gist:bf53b245f5e9b5611f43e682d03358ea
Created September 15, 2017 10:02
JavaScript Tab-Notification when you leave the Tab
var msg1 = 'We miss you...';
var msg2 = '...come back!';
var original = document.title;
var hold;
$(window).focus(function() {
clearInterval(hold);
if (original) {
document.title = original;
}
}).blur(function() {