Skip to content

Instantly share code, notes, and snippets.

View dennyweiss's full-sized avatar

Denny Weiß dennyweiss

View GitHub Profile
@blakethepatton
blakethepatton / Description.md
Last active November 7, 2023 09:37
Getting Mailhog running on a dev server (nginx, letsencrypt, ssl, ubuntu)

Get it running as a service

wget https://github.com/mailhog/MailHog/releases/download/v1.0.0/MailHog_linux_amd64

mv MailHog_linux_amd64 mailhog

chmod +x mailhog

sudo vi /etc/systemd/system/mailhog.service

https://www.nginx.com/blog/free-certificates-lets-encrypt-and-nginx/
http://matthieukeller.com/2016/12/lets-encrypt-certificate-for-offline-servers-with-ovh-dns.html
https://ungeek.fr/letsencrypt-api-ovh/
https://certbot.eff.org/docs/using.html#certbot-command-line-options
https://github.com/certbot/certbot
https://github.com/antoiner77/letsencrypt.sh-ovh
/etc/letsencrypt/configs/\*.domain.xxx.conf
---------------------------------------------------------------------------------------------------
@bkuhl
bkuhl / .gitlab-ci.yml
Last active February 5, 2024 12:08
How to use docker-compose in GitLab CI
# Using edge-git ensures we're always pulling the latest
# You can lock into a specific version using the *-git tags
# on https://hub.docker.com/_/docker/
image: docker:edge-git
services:
- docker:dind
# If you only need compose in a specific step definitely put this
# only in that step so it's not executed unnecessarily
before_script:
@Shelob9
Shelob9 / NoIE.php
Last active May 4, 2022 17:04
A Laravel middleware to prevent Internet Explorer from accessing route(s)
<?php
namespace App\Http\Middleware;
use Closure;
use UserAgentParser\Exception\NoResultFoundException;
use UserAgentParser\Provider\WhichBrowser;
/**
* Class DeviceDetect
@nickdenardis
nickdenardis / deploy.php
Last active February 13, 2024 16:39
Zero downtime local build Laravel 5 deploys with Deployer
<?php
namespace Deployer;
require 'recipe/laravel.php';
require 'vendor/deployer/recipes/local.php';
require 'vendor/deployer/recipes/rsync.php';
require 'vendor/deployer/recipes/npm.php';
// Configuration
set('ssh_type', 'native');
@sparkbuzz
sparkbuzz / shebangs.md
Last active October 17, 2023 08:40
Shebang List

Bash

#!/usr/bin/env bash
#!/bin/bash

JavaScript

#!/usr/bin/env node
@jrenggli
jrenggli / homebrew-permissions.sh
Last active April 3, 2022 23:32
Fix homebrew permissions
sudo chown -R $(whoami) /usr/local/Cellar
sudo chown -R $(whoami) /usr/local/Homebrew
sudo chown -R $(whoami) /usr/local/var/homebrew
sudo chown -R $(whoami) ${HOME}/Library/Caches/Homebrew
sudo chown -R $(whoami) ${HOME}/Library/Logs/Homebrew
sudo chown -R $(whoami) /usr/local/etc
sudo chown -R $(whoami) /usr/local/opt
sudo chown -R $(whoami) /usr/local/bin
sudo chown -R $(whoami) /usr/local/var
sudo chown -R $(whoami) /usr/local/share/man/man1
@cknaap
cknaap / SimpleLogCheck.cs
Last active December 17, 2021 22:11
Easily check ILogger<T> interactions with ASP.NET Core Logging and Moq
using Microsoft.Extensions.Logging;
using Moq;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Xunit;
namespace Knaap.Utilties
{
@dennyweiss
dennyweiss / phpspec-phpstorm-watcher-run.sh
Created June 11, 2016 10:45
Run phpspec through phpstorm filewatcher
#!/usr/bin/env bash
FILE_PATH="${1}"
PHPSPEC_PATH="bin/phpspec"
if [[ "${FILE_PATH}" == "" ]]; then
echo "File path missing"
exit 1
@philipstanislaus
philipstanislaus / sane-caching.nginx.conf
Last active June 19, 2024 03:05
Sample Nginx config with sane caching settings for modern web development
# Sample Nginx config with sane caching settings for modern web development
#
# Motivation:
# Modern web development often happens with developer tools open, e. g. the Chrome Dev Tools.
# These tools automatically deactivate all sorts of caching for you, so you always have a fresh
# and juicy version of your assets available.
# At some point, however, you want to show your work to testers, your boss or your client.
# After you implemented and deployed their feedback, they reload the testing page – and report
# the exact same issues as before! What happened? Of course, they did not have developer tools
# open, and of course, they did not empty their caches before navigating to your site.