Skip to content

Instantly share code, notes, and snippets.

View StevenGFX's full-sized avatar
🚀
Knocking it out of the planet! 🌎

Steven Williams StevenGFX

🚀
Knocking it out of the planet! 🌎
View GitHub Profile
@StevenGFX
StevenGFX / nuxt3-watch-force-update.md
Last active February 23, 2024 18:49
Nuxt 3 Watch Force Update

Component

const forceUpdate = ref(0);

watch(() => activeRoleFilters, () => {
  forceUpdate.value++; // Increment to force reactivity
}, { deep: true });
@StevenGFX
StevenGFX / html-attr
Created November 18, 2022 20:10
HTML attributes
{
htmlAttrs: {
lang: 'en',
'data-theme': 'light',
},
}
@StevenGFX
StevenGFX / confcats-template-presentation.md
Last active August 3, 2020 23:42
ConfCats - Template - Presentation
<div
  class="flex">
  <!-- Presentation main body-->
  <div
    id="presentation--main-body" class="w-full xl:w-3/4">
    <!-- Presentation header -->
    <div
      id="presentation--header" class="flex flex-wrap">
      <!-- Presentation header media -->
@StevenGFX
StevenGFX / confcats-conflux-vsm-shame.css
Last active May 20, 2020 22:45
ConfCats - CONFlux VSM Shame Styles
/* CONFlux VSM SHAME Styles */
/* GLOBAL */
.border-tertiary {
border-color: var(--tertiary) !important;
}
.text-tertiary {
color: var(--tertiary) !important;
@StevenGFX
StevenGFX / twig-tweak.md
Last active September 27, 2023 16:11
Twig Tweak Cheat Sheet

View

This accepts views arguments as well:

{{ drupal_view('who_s_new', 'block_1') }}

View with multiple arguments:

{{ drupal_view('who_s_new', 'block_1' 'contextarg1', 'contextarg2', '...') }}

Presentation template

<div class="flex-fill">
  <h2 class="text-uppercase h6 font-weight-bold text-center mb-3">Sponsors</h2>
  <ul class="cc-affiliates field__items d-flex flex-wrap list-unstyled justify-content-center">
    <li class="cc-affiliates-item field__item col-12 col-sm-6 col-md-3 align-self-center mx-auto">
      <div role="article" about="/affilate/institute-electrical-and-electronics-engineers-ieee" class="node node--type-cc-affiliate node--view-mode-cc-embedded-condensed clearfix">
        <div class="col-12 pr-md-0 affiliate-logo-img position-relative bg-white mb-3 text-center">
          <a href="https://ieee.org" title="https://ieee.org" target="_blank">

Keybase proof

I hereby claim:

  • I am stevengfx on github.
  • I am stevengfx (https://keybase.io/stevengfx) on keybase.
  • I have a public key ASD8KpKvjHTKyiJKuk9btlyDqqUT8M4H7TSqx115FU-SNQo

To claim this, I am signing this object:

@StevenGFX
StevenGFX / launch.json
Last active May 30, 2019 22:17
ConfCats - VSCode XDebug settings for launch.json #confcats
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Listen for XDebug",
"type": "php",
"request": "launch",
@StevenGFX
StevenGFX / php.ini
Last active May 30, 2019 22:17
ConfCats - XDebug settings for php.ini #confcats
# Extra custom Xdebug setting for debug to work in VSCode.
xdebug.remote_enable = 1
xdebug.remote_autostart = 1
@StevenGFX
StevenGFX / node.twig.html
Last active November 27, 2018 22:45 — forked from leahtard/node.twig.html
Get file url in node for Drupal 8 twig template #drupal8 #twig
{# Get URL of single file field #}
{{ node.field_file.entity.uri.value }}
{# Get URL of multi file field #}
{{ node.field_file['#items'].entity.uri.value }}
{# Trun into link #}
{{ file_url(node.field_file.entity.uri.value) }}
{# Check if there is at least one value #}