Skip to content

Instantly share code, notes, and snippets.

View it-can's full-sized avatar

M. Vugteveen it-can

View GitHub Profile
@aniket-magadum
aniket-magadum / 2023_11_01_025054_create_http_logs_table.php
Last active December 16, 2023 21:22
Laravel Logging Http Client Request and Response
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.

To symlink SSH_AUTH_SOCK on boot to system-wide switch the value from default ssh agent:

  1. Change /opt/homebrew/ to the correct homebrew path (/opt/homebrew is for Apple Silicon and /usr/local for x86)
  2. Change the ssh agent as needed, this example uses https://github.com/FiloSottile/yubikey-agent
  3. Save as ~/Library/LaunchAgents/link-ssh-auth-sock.plist
  4. Run launchctl load -F ~/Library/LaunchAgents/link-ssh-auth-sock.plist

Technique taken from: https://evilmartians.com/chronicles/stick-with-security-yubikey-ssh-gnupg-macos

@martin-juul
martin-juul / sysctl.conf
Created September 26, 2020 11:19 — forked from JoeyBurzynski/sysctl.conf
sysctl.conf Optimization / Ubuntu 18.04
# Kernel sysctl configuration file for Linux
#
# Version 1.14 - 2019-04-05
# Michiel Klaver - IT Professional
# http://klaver.it/linux/ for the latest version - http://klaver.it/bsd/ for a BSD variant
#
# This file should be saved as /etc/sysctl.conf and can be activated using the command:
# sysctl -e -p /etc/sysctl.conf
#
# For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and sysctl.conf(5) for more details.
@ChristopherA
ChristopherA / brew-bundle-brewfile-tips.md
Last active July 20, 2024 12:13
Brew Bundle Brewfile Tips

Brew Bundle Brewfile Tips

Copyright & License

Unless otherwise noted (either in this file or in a file's copyright section) the contents of this gist are Copyright ©️2020 by Christopher Allen, and are shared under spdx:Creative Commons Attribution Share Alike 4.0 International (CC-BY-SA-4.) open-source license.

Sponsor

If you more tips and advice like these, you can become a monthly patron on my GitHub Sponsor Page for as little as $5 a month; and your contributions will be multipled, as GitHub is matching the first $5,000! This gist is all about Homebrew, so if you like it you can support it by donating to them or becoming one of their Github Sponsors.

@fritsstegmann
fritsstegmann / Setup Redis 6 with TLS on Ubuntu 18.04.md
Last active January 5, 2024 18:50
Setup Redis 6 with TLS
On Ubuntu 18.04
@spaantje
spaantje / CurateleEnBewindregisterApi.php
Last active November 30, 2023 15:21
De Rechtspraak CCBR data service
<?php
namespace App\Apis\Rechtspraak;
use SoapVar;
use stdClass;
use SoapClient;
use SoapHeader;
class CurateleEnBewindregisterApi
@calebporzio
calebporzio / RouteDirectives.php
Created January 4, 2020 10:33
Blade Route Directives
<?php
// Register these inside a service provider:
Blade::directive('route', function ($expression) {
return "<?php echo route({$expression}) ?>";
});
Blade::directive('routeIs', function ($expression) {
return "<?php if (request()->routeIs({$expression})) : ?>";
@rjnienaber
rjnienaber / install.sh
Created September 6, 2018 10:29
Compile ImageMagick with WEBP and HEIC support on Ubuntu 16.04
# $ lsb_release -a
# No LSB modules are available.
# Distributor ID: Ubuntu
# Description: Ubuntu 16.04.5 LTS
# Release: 16.04
# Codename: xenial
# $ uname -a
# Linux xps 4.4.0-134-generic #160-Ubuntu SMP Wed Aug 15 14:58:00 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
@djmaze
djmaze / README.md
Last active May 5, 2021 09:35
Boosting Docker performance on OSX via NFS mounts

Run the script from this post in order to set up NFS:

curl -sL https://gist.githubusercontent.com/seanhandley/7dad300420e5f8f02e7243b7651c6657/raw/fdd77fe66cf9ce893fa0175d735cbede2bb065e4/setup_native_nfs_docker_osx.sh >/tmp/setup_native_nfs_docker_osx.sh 
bash /tmp/setup_native_nfs_docker_osx.sh
rm /tmp/setup_native_nfs_docker_osx.sh

Copy the supplied docker-compose.override.yml to your project directory. Adjust the version (version), service name (app) and the app path (/usr/src/app) according to the app service definition in your existing docker-compose.yml.

@soderlind
soderlind / Install.txt
Last active March 5, 2024 20:30
macOS DoH! (DNS over HTTPS) using cloudflared
1) Install cloudflared using homebrew:
brew install cloudflare/cloudflare/cloudflared
2) Create /usr/local/etc/cloudflared/config.yaml, with the following content
proxy-dns: true
proxy-dns-upstream:
- https://1.1.1.1/dns-query
- https://1.0.0.1/dns-query