Skip to content

Instantly share code, notes, and snippets.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@strarsis
strarsis / child-theme.css
Created September 20, 2018 21:59
twentyseventeen child theme: Keep navigation menu for smaller breakpoints
@media screen and (min-width: 38em) { /* default is 48em */
/* Navigation */
.navigation-top {
bottom: 0;
font-size: 14px;
font-size: 0.875rem;
left: 0;
position: absolute;
INFO global: Vagrant version: 2.2.3
INFO global: Ruby version: 2.4.4
INFO global: RubyGems version: 2.6.14.1
INFO global: VAGRANT_WSL_ENABLE_WINDOWS_ACCESS="1"
INFO global: VAGRANT_WSL_WINDOWS_ACCESS_USER_HOME_PATH="[redacted]/trellis"
INFO global: VAGRANT_EXECUTABLE="/opt/vagrant/embedded/gems/2.2.3/gems/vagrant-2.2.3/bin/vagrant"
INFO global: VAGRANT_INSTALLER_EMBEDDED_DIR="/opt/vagrant/embedded"
INFO global: VAGRANT_INSTALLER_ENV="1"
INFO global: VAGRANT_INSTALLER_VERSION="2"
INFO global: VAGRANT_LOG="debug"
@strarsis
strarsis / example.php
Created February 3, 2019 18:17
Set ACF Free + ACF PRO Google Maps API key in WordPress (plugin) (Bedrock based WordPress installation)
<?php
// Authorize API for project:
// https://console.developers.google.com/apis/api/places_backend?project=_
// Uses GOOGLE_API_KEY environment variable (WordPress Bedrock dotenv)
$google_api_key = getenv('GOOGLE_API_KEY');
if($google_api_key !== false and !empty($google_api_key)) {
@strarsis
strarsis / example.blade.php
Created February 12, 2019 15:40
ACF Flexible fields with blade/sage9
<?php
@while(have_rows('flexible_field', $post->ID)) @php(the_row())
@while(have_rows('nested_field', $post->ID)) @php(the_row())
get_sub_field('some_field')
@endwhile
@endwhile
@strarsis
strarsis / gist:ba259178d287a0bba7254a0fca392d79
Last active January 21, 2020 15:01
Gutenberg price block evaluation
Price boxes/columns/tables block
Requirements
3x columns
Fields:
Title
Description/Body (full, for tables)
Price
Button
<?php
/*
Plugin Name: Gutenberg Group Test
Plugin URI: https://gist.github.com/strarsis/3c3a96e4c634b35a5cd14de747e1ec82
Description: Adds a test block style for core/group block.
Version: 0.0.1
Author: strarsis
Author URI: https://gist.github.com/strarsis
License: MIT
*/
@strarsis
strarsis / 50-cloud-init.yml
Last active February 13, 2023 19:30
Hetzner Cloud netplan configuration for IPv4+IPv6 (Dual Stack)
# /etc/netplan/50-cloud-init.yml
# Ensure that other netplan config yml files in /etc/netplan/ don't interfere with this configuration
network:
version: 2
renderer: networkd
ethernets:
ens3: # (Primary interface, usually ens3 or ens33 on recent Ubuntus)
addresses:
- <Hetzner instance IP4>/32
@strarsis
strarsis / postcss.config.js
Last active April 20, 2020 14:48
test.css
module.exports = {
map: {
inline: false,
},
plugins: [
require('postcss-css-variables'),
],
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.