Skip to content

Instantly share code, notes, and snippets.

View lcube45's full-sized avatar
🏌️‍♂️
Focusing

lcube lcube45

🏌️‍♂️
Focusing
View GitHub Profile
@jgamblin
jgamblin / digicertacm.sh
Created November 4, 2017 23:52
Automating Digicert Certificates Into AWS ACM
#!/bin/bash
#Required
apikey=
domain=
commonname=$1
orgid=
#Change to your company details
country=
@edsiper
edsiper / kubernetes_commands.md
Last active April 8, 2025 09:02
Kubernetes Useful Commands
@MatthieuScarset
MatthieuScarset / sonar-project.properties
Created June 12, 2017 17:35
Default Sonar properties for Drupal 8 project
# must be unique in a given SonarQube instance
sonar.projectKey=ONE80WEB:ONE80WEB
# this is the name and version displayed in the SonarQube UI. Was mandatory prior to SonarQube 6.1.
sonar.projectName=WEBSITE
sonar.projectVersion=1.0
# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows.
# This property is optional if sonar.modules is set.
sonar.sources=./web
function THEMENAME_theme_suggestions_block_alter(array &$suggestions, array $variables) {
if (isset($variables['elements']['content']['#block_content'])) {
$suggestions[] = 'block__' . $variables['elements']['content']['#block_content']->bundle();
}
}
@raphaellarrinaga
raphaellarrinaga / drupal_8_twig_cheatsheet.md
Last active February 23, 2025 02:49
[Drupal 8 Twig cheatsheet] #tags: drupal8, twig, cheatsheet

Drupal 8 Twig cheatsheet

Please note I created that sheet as a personal side note/draft and not everything is fully tested. There could be errors or better things to do. So if you spot something wrong or something that can be improved, feel free to comment below and I will do the changes.

Getting Drupal 8 field values in Twig

Image path: {{ file_url(content.field_name['#items'].entity.uri.value) }}

@Eyal-Shalev
Eyal-Shalev / ComboForm.php
Created June 7, 2016 19:41
An example form object (Drupal 8) that combines multiple forms into itself.
<?php
namespace Drupal\sandbox\Form;
use Drupal\Core\Form\FormBase;
use Drupal\Core\Form\FormInterface;
use Drupal\Core\Form\FormState;
use Drupal\Core\Form\FormStateInterface;
use Drupal\node\Entity\Node;
use Drupal\user\Entity\User;
@darylounet
darylounet / elb-internal-route53-updater.php
Last active September 18, 2023 12:03
ELB Internal Route53 Updater
#!/usr/bin/php
<?php
/**
* ELB Internal Route53 Updater
* @author Cyril Aknine https://github.com/darylounet
*/
$vpcId = 'your-vpc-id';
$elbNetworkDescription = 'Your ELB network interface description (generated like "ELB your-elb-name")';
$route53InternalHostedZoneId = 'Your Route53 Internal hosted zone ID';
@AlexSkrypnyk
AlexSkrypnyk / mymodule.css
Last active April 17, 2024 08:37
Drupal 'add more' and 'remove single' AJAX buttons on multi value custom field using FormAPI
input.form-submit.button-small {
padding: 4px 8px;
font-weight: bold;
}
.container-inline input.form-submit.button-small + .ajax-progress.ajax-progress-throbber .throbber {
position: absolute;
left: 19px;
margin-top: 7px;
}
@JamesMGreene
JamesMGreene / gitflow-breakdown.md
Last active January 6, 2026 11:08
`git flow` vs. `git`: A comparison of using `git flow` commands versus raw `git` commands.

Initialize

gitflow git
git flow init git init
  git commit --allow-empty -m "Initial commit"
  git checkout -b develop master

Connect to the remote repository