Skip to content

Instantly share code, notes, and snippets.

@ilunie
ilunie / esp32.ino
Created January 21, 2026 14:32
ESP32 - pH sensor
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 16, 2);
float calibration_value = 21.34 + 1.5;
unsigned long int avgval;
int buffer_arr[10], temp;
float ph_act;
@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
print("hello world")