Skip to content

Instantly share code, notes, and snippets.

View CHANGELOG.md

Change Log

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

[Unreleased] - yyyy-mm-dd

Here we write upgrading notes for brands. It's a team effort to make them as

@abayer
abayer / Jenkinsfile
Created Feb 15, 2017
An example Declarative Pipeline Jenkinsfile for Feb 15 2017 demo
View Jenkinsfile
// A Declarative Pipeline is defined within a 'pipeline' block.
pipeline {
// agent defines where the pipeline will run.
agent {
// This also could have been 'agent any' - that has the same meaning.
label ""
// Other possible built-in agent types are 'agent none', for not running the
// top-level on any agent (which results in you needing to specify agents on
// each stage and do explicit checkouts of scm in those stages), 'docker',
@jonico
jonico / Jenkinsfile
Last active May 16, 2022
Example for a full blown Jenkins pipeline script with CodeQL analysis steps, multiple stages, Kubernetes templates, shared volumes, input steps, injected credentials, heroku deploy, sonarqube and artifactory integration, Docker containers, multiple Git commit statuses, PR merge vs branch build detection, REST API calls to GitHub deployment API, …
View Jenkinsfile
#!groovy
import groovy.json.JsonOutput
import groovy.json.JsonSlurper
def label = "mypod-${UUID.randomUUID().toString()}"
podTemplate(label: label, yaml: """
spec:
containers:
- name: mvn
image: maven:3.3.9-jdk-8
@michaellihs
michaellihs / jenkins-pipeline-cheat-sheet.md
Last active Dec 30, 2020
Jenkins Pipeline Plugin Cheat Sheet
View jenkins-pipeline-cheat-sheet.md

Jenkins Pipeline Plugin Cheat Sheet

My collection of useful hints and snippets for the Jenkins Pipeline Plugin

Testing Jenkins Pipelines

@ralphschindler
ralphschindler / README.md
Last active Apr 13, 2022
Docker For Mac Host Address Alias To Enable PHP XDebug (10.254.254.254 Trick)
View README.md

Docker (Mac) De-facto Standard Host Address Alias

This launchd script will ensure that your Docker environment on your Mac will have 10.254.254.254 as an alias on your loopback device (127.0.0.1). The command being run is ifconfig lo0 alias 10.254.254.254.

Once your machine has a well known IP address, your PHP container will then be able to connect to it, specifically XDebug can connect to it at the configured xdebug.remote_host.

Installation Of IP Alias (This survives reboot)

Copy/Paste the following in terminal with sudo (must be root as the target directory is owned by root)...

@pfaocle
pfaocle / gen-d8-salt.sh
Created Mar 8, 2016
Generate Drupal 8 hash salt
View gen-d8-salt.sh
drush eval "var_dump(Drupal\Component\Utility\Crypt::randomBytesBase64(55))"
@benlinton
benlinton / multiple_mysql_versions_for_development.md
Last active Jun 29, 2022
Multiple MySQL Versions with Homebrew
View multiple_mysql_versions_for_development.md

Multiple MySQL Versions for Development

Options included below:

  • Using Docker docker-compose
  • Using Homebrew brew

Using Docker (recommended)

This gist was originally created for Homebrew before the rise of Docker, yet it may be best to avoid installing mysql via brew any longer. Instead consider adding a barebones docker-compose.yml for each project and run docker-compose up to start each project's mysql service.

@PurpleBooth
PurpleBooth / README-Template.md
Last active Jun 29, 2022
A template to make good README.md
View README-Template.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@DenisIzmaylov
DenisIzmaylov / INSTALLATION.md
Last active Mar 26, 2022
OS X 10.11 El Capitan: fresh install with Node.js (io.js) Developer Environment
View INSTALLATION.md

OS X 10.11 (El Capitan) / Node.js and io.js Developer Environment

Custom recipe to get OS X 10.11 El Capitan running from scratch with useful applications and Node.js Developer environment. I use this gist to keep track of the important software and steps required to have a functioning system after fresh install.

Content

@q0rban
q0rban / module_enable.php
Created Oct 22, 2014
Enabling Drupal modules in an update hook
View module_enable.php
<?php
function hook_update_n() {
if (!drupal_check_module('foo')) {
throw new DrupalUpdateException('Foo does not have requirements needed to be enabled.');
}
module_enable(array('foo'));
return t('Enabled Foo module.');
}