Skip to content

Instantly share code, notes, and snippets.

View Schnitzel's full-sized avatar

Michael Schmid Schnitzel

View GitHub Profile
@Schnitzel
Schnitzel / readme
Created July 26, 2011 14:00
rapperswil-jona.ch CSS Fixes
We have now a full GIT Repository:
https://github.com/Schnitzel/RJ-CSS-Fixes
If you want to help, create a GITHub Account and edit the rj.css file (with forking it and make a pull request)
$buttons-sprite-dimensions: true;
$buttons-layout:horizontal;
@import "buttons/*.png";
$buttons-sprites: sprite-map("buttons/*.png");
@each $icon in 'text-link', 'picture', 'video' {
label[for=edit-field-article-type-und-#{$icon}]{
@include buttons-sprite(#{$icon}_big);
&.active {
#!/bin/bash
# Add Vagrant's NFS setup commands to sudoers, for `vagrant up` without a password
# Updated to work with Vagrant 1.3.x
# Stage updated sudoers in a temporary file for syntax checking
TMP=$(mktemp -t vagrant_sudoers)
cat /etc/sudoers > $TMP
cat >> $TMP <<EOF
# Allow passwordless startup of Vagrant when using NFS.
#!/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
curl -X POST 'https://api.telapi.com/v1/Accounts/<ACCOUNTSID>/Lookups/Carrier' -u 'ACCOUNTSID:TOKEN' -d 'PhoneNumber=+17325551212'
@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) {
# 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:
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 ║
╚═════════════════╩══════════════════╩════════════════╝
### 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:
@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: