Skip to content

Instantly share code, notes, and snippets.

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

lcube lcube45

🏌️‍♂️
Focusing
View GitHub Profile
@adrienjoly
adrienjoly / template-audit-capacités-devops-dora.md
Last active May 29, 2023 15:12
Template que j'utilise pour auditer mes client sur les "capacités DevOps" proposées par le DORA, et leur donner des recommandations pour progresser. C'est en markdown => importable facilement dans Notion.

Audit Capacités DevOps/DORA

Le livre "Accelerate: The Science of Lean Software and DevOps: Building and Scaling High Performing Technology Organizations" (Gene Kim, Jez Humble, and Nicole Forsgren, 2018) s'appuie sur 5 ans d'études scientifiques pour faire ressortir les pratiques effectivement mises en oeuvre par les sociétés "tech" les plus performantes. (selon la classification de Westrum)

L'équipe de DORA (DevOps Research and Assessment) a identifié et validé un ensemble de capacités permettant d'optimiser les performances organisationnelles et celles de la livraison de logiciels. Ces articles décrivent comment mettre en œuvre, améliorer et mesurer ces capacités.

Source: https://cloud.google.com/architecture/devops/capabilities

Les capacités recommandées sont au nombre de 27, classés en 3 catégories.

@masayoshi644
masayoshi644 / _HowToSetupAWSWAFv2.md
Last active June 13, 2024 14:15
How to setup AWS WAFv2
@johann8384
johann8384 / Jenkinsfile
Created April 27, 2021 22:43
Puppet Jenkins
stages{
stage('Linting') {
parallel {
stage('Chekov') {
steps {
script {
dir("${env.WORKSPACE}/terraform"){
sh "checkov --directory terraform/modules -o junitxml > $WORKSPACE/checkov.xml || true"
}
}
use Drupal\field\Entity\FieldStorageConfig;
/**
* Resize field.
*/
function demo_field_resize_update_8001() {
$field_name = 'field_to_resize';
$entity_type = 'node';
$database = \Drupal::database();
$database->query("ALTER TABLE node__" . $field_name . " MODIFY " . $field_name . "_value VARCHAR(200)");
docker: ca.pem server.pem server-key.pem
docker-compose up
ca.pem ca-key.pem:
cfssl gencert \
-initca ca-csr.json | cfssljson -bare ca
server.pem server-key.pem:
cfssl gencert \
-ca=ca.pem \
source:
defaults:
MY_VALUE: 'http://understanddrupal.com'
plugin: source_plugin_name
source_plugin_config: source_config_value
process:
process_destination: defaults/MY_VALUE
#!/bin/sh
#
# This script deploys the given manifest,
# tracks the deployment, and rolls back on failure.
#
# First execute this with "myapp.yaml" and then try it with "myapp.failing.yaml"
#
MANIFEST_PATH=$1
DEPLOYMENT_NAME=myapp
@andrerom
andrerom / liip.sh
Last active July 3, 2022 14:33
Shell command to be able to switch between MacOS liip PHP versions + set some default PHP config automatically
#!/bin/sh
# This simple script lists the installed OSX PHP packages
# and lets you choose which one to activate (by changing the symlink).
# Fairly rudimentary, but it does the job (for me).
#
# Install to (*nix): /usr/local/bin/liip.sh
# Run using: sudo liip
#
# Tip: you can add an alias to your ~/.profile
@andypost
andypost / .gitlab-ci.yml
Created May 21, 2018 13:34
base sniffers
image: skilldlabs/php:72
variables:
GIT_DEPTH: "3"
before_script:
- date
- pwd
stages:
@bdlangton
bdlangton / Blocks.md
Last active October 12, 2023 08:40
Drupal 8 programmatic solutions

Render custom blocks

$bid = 'myblock';
$block = \Drupal\block_content\Entity\BlockContent::load($bid);
$render = \Drupal::entityTypeManager()->getViewBuilder('block_content')->view($block);

Render plugin blocks

$block_manager = \Drupal::service('plugin.manager.block');