Skip to content

Instantly share code, notes, and snippets.

Michael Schmid Schnitzel

Block or report user

Report or block Schnitzel

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:f7b06cf4673e01c0314f724bea034ed6
### 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:
View accessing backup.md

1. Get environments

Request:

query getAllEnviornments {
  projectByName(name: "drupal-example") {
    id
    environments {
      id
      name
View test.php
<?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 Apr 16, 2018
Drupal SA-CORE-2018-002 attacks
View attacks.md

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

Attack 1

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

Array Key: #markup

Array Value:

View gist:f477778f29cafb2666b074595b00729e
### 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:
View Docker Machine vs Docker for Mac
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 ║
╚═════════════════╩══════════════════╩════════════════╝
View gist:c9eb4befb94b976c5b88703c9a58087f
# 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 Oct 15, 2014
SA-CORE-2014-005 Patch only
View gist:36cdf218dac7859dbc74
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) {
View carrier lookup curl
curl -X POST 'https://api.telapi.com/v1/Accounts/<ACCOUNTSID>/Lookups/Carrier' -u 'ACCOUNTSID:TOKEN' -d 'PhoneNumber=+17325551212'
View install_vagrant_sudoers.sh
#!/bin/bash
# Script for placing sudoers.d files with syntax-checking
if [ -z "$1" ]; then
# Making a temporary file to contain the sudoers-changes to be pre-checked
TMP=$(mktemp)
cat > $TMP <<EOF
Cmnd_Alias VAGRANT_EXPORTS_ADD = /bin/su root -c echo '*' >> /etc/exports
Cmnd_Alias VAGRANT_NFSD = /etc/init.d/nfs-kernel-server restart
Cmnd_Alias VAGRANT_EXPORTS_REMOVE = /bin/sed -e /*/ d -ibak /etc/exports
You can’t perform that action at this time.