Skip to content

Instantly share code, notes, and snippets.

View vincenzo's full-sized avatar

Vinnie Russo vincenzo

  • Italy
View GitHub Profile
@vincenzo
vincenzo / id_rsa.pub
Last active December 17, 2019 15:02
Public SSH Key
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDWq8watMYvb1HqvJ6ZEKgs6WL/sBB/bYdZJBdOlMDwkByMy1KEtRa0leDGEvCudY1DGOcUvATi26TOmHQvFjc6SfFsUXAH2MXxwZG8EupTCpOKAILSfywK+SvTOzjs0isQjNMB+3RxSP3fvYv1YceDRz1cOrliNjOddWS0ovk/NAro8I+WgxO3bHmpAc10iIgYTGB5WtaJ/302HXaHQ6IGTdrPUbikUh8iZh4ITnG0RBQCa8RXkzlp9p4LR6aWtcCdaoHm/RHb8Jlb55CGcGi4lyW6+b6yVggo9hVo3FOYXC2FqsD0e7cvovmBDamDdA+xOee41XH+aDWm91yN0VoZs9qYfWOQO2FLTrfoB5SQ8DQkx70zhRUPISEumijbzf17/xxPjcJblfJpaNRWTeGSiYyfcumkHfmM+bNGAArOl7q/AmIVL8uqpVTfOUVpLKGAWqLCEls1jTRJErAjWWkfThWgRxMjlqd8eDHZcYHlzllDIno1H0a6eazrq4mcWZ38SmQrSWuddMewa+oWChhwWpKXS1IidrCEInGaiY1JLhsGAWeLlO4/Rk03+Vhu9+TB3MxVP4Ho1yhPdirCp2jZS2cPm6Ga3e/O088OHd4xIz3aI7AA0G64E17QOGJA5BlwRgtELBOzoD84AxzNdLf0aTkg+8i3fP9+AM2d2GF4eQ== v@artetecha.com
@vincenzo
vincenzo / test.graphql
Last active July 1, 2018 22:44
Nested test mutation
# One Subpage.
mutation {
createPage(data: {title:"Vincenzo", subpages: {create:{title:"Russo"}}}) {
id
title
subpages {
id
title
}
}
@vincenzo
vincenzo / config-1.yml
Created March 22, 2018 16:03
Node.js, Platform.sh, GitHub, CircleCI
version: 2
jobs:
test:
docker:
- image: circleci/node:8.9.3
environment:
PLATFORM_VARIABLES: "set this to what you need, if you need"
steps:
- checkout
- run:
@vincenzo
vincenzo / .lando.yml
Last active February 28, 2018 13:47
Docker Compose Links and Lando
name: zoo
proxy:
panda:
- panda.lndo.site
puma:
- puma.lndo.site
rhino:
- rhino.lndo.site
- '*.rhino.lndo.site'
@vincenzo
vincenzo / stale-envs.sh
Last active March 7, 2019 16:43
Delete stale (>= 1-month old) environments from a platform.sh account
#!/usr/bin/env bash
# Requires Platform.sh CLI >= 3.28.0
# For all projects
platform projects --pipe |
while read PROJ; do
# For all PROJ's active environments (excluding qa, stage, master, snapshot)
platform environments --pipe -I -p ${PROJ} | grep -vo "master\|qa\|stage\|snapshot" |
while read ENV; do
@vincenzo
vincenzo / wp-config-secure.php
Last active August 19, 2017 08:06
Enforce HTTPS for WP on Pantheon.io
<?php
// ...
/** A couple extra tweaks to help things run well on Pantheon. **/
if (isset($_SERVER['HTTP_HOST'])) {
// HTTPS is now the default scheme.
$scheme = 'https';
$base_url = $scheme . '://' . $_SERVER['HTTP_HOST'];
define('WP_HOME', $base_url);
@vincenzo
vincenzo / genuine-fails.log
Last active February 8, 2017 11:41
Change repo structure
Project k2eya57d5oqcm could not be processed due to lack of available environments. Total number of available environments: 6 - Number of environments used: 7
Project pgzierefj4csc could not be processed due to lack of available environments. Total number of available environments: 3 - Number of environments used: 4
Project tglhp53fzconu could not be processed due to lack of available environments. Total number of available environments: 6 - Number of environments used: 6
Project cf2n7pzkhcf5e could not be processed due to lack of available environments. Total number of available environments: 6 - Number of environments used: 6
Project w4vkbjym5rnka could not be processed due to lack of available environments. Total number of available environments: 6 - Number of environments used: 6
Project 2ngsdsa3a3t2y could not be processed due to lack of available environments. Total number of available environments: 6 - Number of environments used: 7
Project jsznqslhihyhk could not be processed due to lack of available
@vincenzo
vincenzo / isc.patch
Last active October 19, 2016 09:19
isc.patch
diff --git a/etc/cli/src/Command/DbSanitizeCommand.php b/etc/cli/src/Command/DbSanitizeCommand.php
index fba916a..ac4517a 100644
--- a/etc/cli/src/Command/DbSanitizeCommand.php
+++ b/etc/cli/src/Command/DbSanitizeCommand.php
@@ -22,6 +22,8 @@ class DbSanitizeCommand extends SolasCommandBase {
protected function execute(InputInterface $input, OutputInterface $output) {
$this->validateInput($input);
$project = new SolasProject($this->getSelectedProject());
+ $internalCode = $this->selectEnvironment('snapshot')
+ ->getVariable('SITE_CODE')->value;
@vincenzo
vincenzo / settings.info
Last active August 31, 2016 12:45
Exporting date formats to code with Multilingual Drupal
features[variable][] = date_first_day
features[variable][] = date_format_long
features[variable][] = date_format_medium
features[variable][] = date_format_month_year
features[variable][] = date_format_short
features[variable][] = date_format_time
features[variable][] = date_format_year
@vincenzo
vincenzo / chr-settings.php
Last active April 28, 2016 21:52
Sample settings for cURL HTTP Request Drupal module
<?php
/**
* External access proxy settings:
*
* If your site must access the Internet via a web proxy then you can enter
* the proxy settings here. Currently only basic authentication is supported
* by using the username and password variables. The 'exceptions' variable
* is an array of host names to be accessed directly, not via proxy.
*/