Skip to content

Instantly share code, notes, and snippets.

@ilunie
ilunie / monzo-alertmanager-config.yaml
Created April 6, 2022 07:19 — forked from milesbxf/monzo-alertmanager-config.yaml
Monzo's Alertmanager Slack templates
###################################################
##
## Alertmanager YAML configuration for routing.
##
## Will route alerts with a code_owner label to the slack-code-owners receiver
## configured above, but will continue processing them to send to both a
## central Slack channel (slack-monitoring) and PagerDuty receivers
## (pd-warning and pd-critical)
##
@ilunie
ilunie / Jenkinsfile.groovy
Created March 31, 2022 07:38 — forked from Faheetah/Jenkinsfile.groovy
Jenkinsfile idiosynchrasies with escaping and quotes
node {
echo 'Results included as an inline comment exactly how they are returned as of Jenkins 2.121, with $BUILD_NUMBER = 1'
echo 'No quotes, pipeline command in single quotes'
sh 'echo $BUILD_NUMBER' // 1
echo 'Double quotes are silently dropped'
sh 'echo "$BUILD_NUMBER"' // 1
echo 'Even escaped with a single backslash they are dropped'
sh 'echo \"$BUILD_NUMBER\"' // 1
echo 'Using two backslashes, the quotes are preserved'
sh 'echo \\"$BUILD_NUMBER\\"' // "1"
## Useful Commands
Get kubectl version
kubectl version
Get cluster info:
@ilunie
ilunie / helpful-docker-commands.sh
Created November 9, 2020 02:22 — forked from garystafford/helpful-docker-commands.sh
My list of helpful docker commands
###############################################################################
# Helpful Docker commands and code snippets
###############################################################################
### CONTAINERS ###
docker stop $(docker ps -a -q) #stop ALL containers
docker rm -f $(docker ps -a -q) # remove ALL containers
docker rm -f $(sudo docker ps --before="container_id_here" -q) # can also filter
# exec into container
[server]
SERVER
[server:vars]
server_name=SERVER
email=noc@gopractice.io
docker_nginx_ssl=true
@ilunie
ilunie / ECK-Paragraphs-Blocks-and-Custom-Entities.md
Created September 27, 2018 05:51 — forked from nadavoid/ECK-Paragraphs-Blocks-and-Custom-Entities.md
ECK, Paragraphs, Blocks, and Custom Entities in Drupal 8

ECK, Paragraphs, Blocks, and Custom Entities

ECK

  • best suited for custom relational entities
  • each ECK entity stands on its own
  • does not support translation (yet)
  • Use Inline Entity Form and Inline Entity Form Preview for best authoring experience.

Paragraphs

  • best suited for enhancing content entry on individual entities
@ilunie
ilunie / gist:57f41b203a1c1348aeb52f9c0f634be7
Created February 18, 2018 10:05 — forked from prime31/gist:5675017
Simple PHP script showing how to send an Android push notification. Be sure to replace the API_ACCESS_KEY with a proper one from the Google API's Console page. To use the script, just call scriptName.php?id=THE_DEVICE_REGISTRATION_ID
<?php
// API access key from Google API's Console
define( 'API_ACCESS_KEY', 'YOUR-API-ACCESS-KEY-GOES-HERE' );
$registrationIds = array( $_GET['id'] );
// prep the bundle
$msg = array
@ilunie
ilunie / README.md
Created October 17, 2017 06:18 — forked from hofmannsven/README.md
My simply Git Cheatsheet
@ilunie
ilunie / site-maintance.html
Last active November 12, 2022 13:27 — forked from pitch-gist/gist:2999707
HTML: Simple Maintenance Page
<!doctype html>
<head>
<title>Site Maintenance</title>
<meta charset="UTF-8">
<meta name="robots" content="noindex, nofollow">
<style>
body { text-align: center; padding: 150px; }
h1 { font-size: 50px; }
body { font: 20px Helvetica, sans-serif; color: #333; }
article { display: block; text-align: left; width: 650px; margin: 0 auto; }
@ilunie
ilunie / multiple_ssh_setting.md
Created August 17, 2016 02:40 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"