Skip to content

Instantly share code, notes, and snippets.

View Schnitzel's full-sized avatar

Michael Schmid Schnitzel

View GitHub Profile
@Schnitzel
Schnitzel / update-lagoon-registry-with-aws-token.sh
Created June 15, 2020 18:39
update-lagoon-registry-with-aws-token.sh
# !/bin/bash
# README
#
# This script gets an AWS ECR Registry Token and stores it as a variable within a specified Lagoon.
# This is usefull as the AWS ECR Registry Token are only valid for 12 hours and therefore need to be updated regularly.
#
# # Usage
# ```
# export AWS_ACCESS_KEY_ID=xxxx
# export AWS_SECRET_ACCESS_KEY=xxxx
### Keybase proof
I hereby claim:
* I am schnitzel on github.
* I am schnitzel (https://keybase.io/schnitzel) on keybase.
* I have a public key ASA7QArmrZOU18pvAdP2GYgwUw_98Mk6kyWj156YzlOanwo
To claim this, I am signing this object:

1. Get environments

Request:

query getAllEnviornments {
  projectByName(name: "drupal-example") {
    id
    environments {
      id
      name
@Schnitzel
Schnitzel / test.php
Last active February 28, 2019 15:24
<?php
$url = "https://www.example.com";
$options = array(
CURLOPT_RETURNTRANSFER => true, // don't echo page
CURLOPT_VERBOSE =>true,
);
$cm = curl_multi_init();
@Schnitzel
Schnitzel / attacks.md
Last active April 16, 2018 19:40
Drupal SA-CORE-2018-002 attacks

Drupal SA-CORE-2018-002 attacks on amazee.io

Attack 1

First seen: April 13th 2018, 12:54:06

Array Key: #markup

Array Value:

### Keybase proof
I hereby claim:
* I am schnitzel on github.
* I am schnitzel (https://keybase.io/schnitzel) on keybase.
* I have a public key ASBvTBFJ_qBUYDzSUl_PvAFFO-j6H2zRAj2Ax61Dy22gSQo
To claim this, I am signing this object:
Composer Install (with warm composer caches inside a volume mount):
╔═════════════════╦══════════════════╦════════════════╗
║ System ║ Configuration ║ Time ║
╠═════════════════╬══════════════════╬════════════════╣
║ Docker Machine ║ Cachalot ║ 121 - 129 secs ║
║ Docker for Mac ║ delegated flag ║ 120 - 134 secs ║
║ Docker for Mac ║ cached flag ║ 106 - 122 secs ║
║ Docker for Mac ║ consistent flag ║ 179 - 311 secs ║
╚═════════════════╩══════════════════╩════════════════╝
# Create here the Drupal site you would like
version: '2'
services:
drupal:
# Choose your URL and hostname for this Docker Container
# NEEDS to end with '.docker.amazee.io' !
# DO NOT remove the '&hostname'
hostname: &hostname changeme.net.docker.amazee.io
environment:
@Schnitzel
Schnitzel / gist:36cdf218dac7859dbc74
Created October 15, 2014 16:11
SA-CORE-2014-005 Patch only
diff --git a/includes/database/database.inc b/includes/database/database.inc
index f78098b..01b6385 100644
--- a/includes/database/database.inc
+++ b/includes/database/database.inc
@@ -736,7 +736,7 @@ abstract class DatabaseConnection extends PDO {
// to expand it out into a comma-delimited set of placeholders.
foreach (array_filter($args, 'is_array') as $key => $data) {
$new_keys = array();
- foreach ($data as $i => $value) {
+ foreach (array_values($data) as $i => $value) {
curl -X POST 'https://api.telapi.com/v1/Accounts/<ACCOUNTSID>/Lookups/Carrier' -u 'ACCOUNTSID:TOKEN' -d 'PhoneNumber=+17325551212'