Skip to content

Instantly share code, notes, and snippets.

View hgrimelid's full-sized avatar

Håvard hgrimelid

  • Mediebruket
  • Norway
View GitHub Profile
@hgrimelid
hgrimelid / stache.php
Created April 5, 2024 08:20
Statamic Stache - store content outside repo
<?php
/*
* Requires config setting `custom.content_path` to be set
*/
return [
/*
|--------------------------------------------------------------------------
@hgrimelid
hgrimelid / .env
Created September 26, 2023 09:26
Laravel 8 + PHP 8.0 in Docker
DB_CONNECTION=mysql
DB_HOST=host.docker.internal
DB_PORT=33060
DB_DATABASE=mydb
DB_USERNAME=root
DB_PASSWORD=password
@hgrimelid
hgrimelid / svgo.config.js
Created September 5, 2023 12:08
Svgo config
module.exports = {
js2svg: {
pretty: true
},
plugins: [
{
name: 'prefixIds',
params: {
prefixIds: true,
prefixClassNames: true
@hgrimelid
hgrimelid / .tmux.conf
Created June 30, 2021 11:49
Tmux config for server
# Requires Fish
# Rebind prefix key to C-a
unbind C-b
set -g prefix C-a
# force a reload of the config file
unbind r
bind r source-file ~/.tmux.conf
@hgrimelid
hgrimelid / .gitignore
Last active January 31, 2021 11:45
Laravel files
/node_modules
/public/hot
/public/storage
/storage/*.key
/storage/debugbar
/vendor
.env
.env.testing
.env.backup
.phpunit.result.cache
@hgrimelid
hgrimelid / functions.php
Created December 8, 2020 21:51
Wordpress: Remove access to and hide theme editor
<?php
/**
* This comes in handy in cases where you can't set `DISALLOW_FILE_MODS` to `true`
*/
/**
* Remove access to page for all users
*/
add_action('current_screen', function () {
@hgrimelid
hgrimelid / .tmux.conf
Last active January 18, 2021 18:14
My tmux configuration and key bindings
# Requires Fish
# Rebind prefix key to C-a
unbind C-b
set -g prefix C-a
# force a reload of the config file
unbind r
bind r source-file ~/.tmux.conf
@hgrimelid
hgrimelid / le.sh
Created March 2, 2020 11:20
Issue new Let's Encrypt certificates
/etc/letsencrypt/acme.sh --config-home '/etc/letsencrypt/config' --issue -d MYSITE -d www.MYSITE -w /var/www/html -k ec-384
/etc/letsencrypt/acme.sh --config-home '/etc/letsencrypt/config' --install-cert -d MYSITE -d www.MYSITE --ecc --cert-file /etc/letsencrypt/live/MYSITE/cert.pem --key-file /etc/letsencrypt/live/MYSITE/key.pem --fullchain-file /etc/letsencrypt/live/MYSITE/fullchain.pem --ca-file /etc/letsencrypt/live/MYSITE/ca.pem --reloadcmd "service nginx restart"
@hgrimelid
hgrimelid / functions.php
Created September 28, 2018 06:48
Google Tag Manager in Enfold
<?php
/**
* GTM Body Script
*/
add_action( 'ava_after_body_opening_tag', function() {
?>
// GTM code here
<?php
@hgrimelid
hgrimelid / php-dyld.md
Created August 17, 2018 07:36
php: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.61.dylib

After upgrading to Node v.10.9.0 via Homebrew the following error message was thrown from PHP:

dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.61.dylib
  Referenced from: /usr/local/bin/php
  Reason: image not found

Reinstall PHP to fix, for me that's: