Skip to content

Instantly share code, notes, and snippets.

Freek Van der Herten freekmurze

Block or report user

Report or block freekmurze

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@freekmurze
freekmurze / nginx config
Created Aug 31, 2019
Nginx config sendy
View nginx config
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name sendy.freek.dev sendy.murze.be;
root /home/forge/sendy.freek.dev;
# FORGE SSL (DO NOT REMOVE!)
ssl_certificate /etc/nginx/ssl/sendy.freek.dev/xxxxxx/server.crt;
ssl_certificate_key /etc/nginx/ssl/sendy.freek.dev/xxxxxx/server.key;
View ci.yml
on: push
name: Run phpunit testsuite
jobs:
phpunit:
runs-on: ubuntu-latest
container:
image: lorisleiva/laravel-docker:7.3 # Change this to 7.1/7.2/7.3 to specify the PHP Version
steps:
View HorizonDatabaseQueue.php
<?php
namespace App\Libraries\Queue;
use Illuminate\Events\Dispatcher;
use Illuminate\Queue\DatabaseQueue;
use Illuminate\Support\Str;
use Laravel\Horizon\Events\JobDeleted;
use Laravel\Horizon\Events\JobPushed;
use Laravel\Horizon\Events\JobReleased;
@freekmurze
freekmurze / bookmarklet
Last active Feb 22, 2019
Oh Dear! Reachable bookmarklet
View bookmarklet
javascript:{window.location='https://ohdear.app/tools/reachable?prefill='+encodeURIComponent(window.location.href)}
@freekmurze
freekmurze / DiscordChannel.php
Last active Sep 24, 2018
How to use Discord webhooks
View DiscordChannel.php
<?php
namespace App\Services\NotificationChannels\Discord;
use GuzzleHttp\Client;
use GuzzleHttp\RequestOptions;
use Illuminate\Notifications\Notification;
class DiscordChannel
{
@freekmurze
freekmurze / Check.php
Last active May 15, 2018
Refactored Oh Dear! code
View Check.php
<?php
class Check
{
public function needsToRun(): bool
{
if (!$this->belongsToTeamOnActiveSubscriptionOrOnGenericTrial()) {
return false;
}
@freekmurze
freekmurze / GitHub.icls
Created May 7, 2018
GitHub PhpStorm colorscheme
View GitHub.icls
<scheme name="GitHub" version="142" parent_scheme="Default">
<option name="FONT_SCALE" value="1.0" />
<metaInfo>
<property name="created">2018-05-07T11:01:49</property>
<property name="ide">PhpStorm</property>
<property name="ideVersion">2018.1.0.0</property>
<property name="modified">2018-05-07T11:02:04</property>
<property name="originalScheme">GitHub</property>
</metaInfo>
<option name="LINE_SPACING" value="1.4" />
View subscriptions.opml
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
<head>
<title>Subscriptions - freek@spatie.be</title>
</head>
<body>
<outline text="PHP" title="PHP">
<outline htmlUrl="http://frederickvanbrabant.com" title="frederickvanbrabant.com" xmlUrl="http://frederickvanbrabant.com/feed.xml" type="rss" text="frederickvanbrabant.com"/>
<outline htmlUrl="http://mattallan.org" title="mattallan.org" xmlUrl="http://mattallan.org/feed.xml" type="rss" text="mattallan.org"/>
<outline title="asked.io" xmlUrl="https://asked.io/rss" type="rss" text="asked.io"/>
@freekmurze
freekmurze / Envoy.blade.php
Created Mar 23, 2017
Multi server zero downtime Envoy script
View Envoy.blade.php
@setup
require __DIR__.'/vendor/autoload.php';
(new \Dotenv\Dotenv(__DIR__, '.env'))->load();
$appName = "my-app.com";
$repository = "spatie/{$appName}";
$baseDir = "/home/forge/{$appName}";
$releasesDir = "{$baseDir}/releases";
$currentDir = "{$baseDir}/current";
$newReleaseName = date('Ymd-His');
View curry.php
<?php
function curry($f, $argument)
{
return function (...$arguments) use ($f, $argument) {
return $f(...array_merge([$argument], $arguments));
};
}
function add(...$numbers)
You can’t perform that action at this time.