Skip to content

Instantly share code, notes, and snippets.

@saltednut
saltednut / drupal-curl.sh
Created August 6, 2015 19:43
D7 Restws v D8 Rest - node status change
# Drupal 8 (Enabled modules: rest, hal, basic_auth, serialization)
curl -vX PATCH --user admin:pass http://site.dd/node/1 --header "Content-Type: application/hal+json" -d'{"_links":{"type":{"href":"http://site.dd/rest/type/node/article"}}, "status":[{"value":"0"}]}’
# Drupal 7 (Enabled modules: restws, restws_basic_auth)
drush vset restws_basic_auth_user_regex '/.*/'
curl -vX PUT --user admin:pass http://site.dd/node/1 --header "Content-Type: application/json" -d'{"status":"0"}'
#!/usr/bin/env bash
rm -rf composer.phar*
rm -rf composer*
rm -rf drush*
echo "Check out Composer"
git clone git@github.com:composer/composer composer
echo "Install Composer"
wget http://getcomposer.org/composer.phar
#!/usr/bin/env bash
FILE=$1.features.yml
ls -1 config/install > exported.yml
perl -pi -w -e 's/.yml//g;' exported.yml
awk '{print " - " $0;}' exported.yml > $FILE
perl -pi -e '$.=0 if eof;print "required:\n" if ($.==1)' $FILE
rm -r exported.yml
@saltednut
saltednut / sadness.diff
Created July 22, 2016 15:09
Migrate 8.x woes
diff --git a/src/ScenariosHandler.php b/src/ScenariosHandler.php
index 9652385..af5f747 100644
--- a/src/ScenariosHandler.php
+++ b/src/ScenariosHandler.php
@@ -219,7 +219,8 @@ class ScenariosHandler implements ContainerInjectionInterface {
$migrations = scenarios_scenario_migrations($scenario);
// Run the migrations in the provided order.
- $migration_manager = $this->migrationPluginManager;
+ //$migration_manager = $this->migrationPluginManager;
[~]$ drupal self-update
Checking for updates from version: 1.0.0-beta3
Update from version 1.0.0-beta3 to version 1.0.0-rc4. (yes/no) [yes]:
> yes
Updating to version 1.0.0-rc4.
PHP Warning: file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed in phar:///usr/local/bin/drupal/src/Command/Self/ManifestStrategy.php on line 78

install homebrew

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”

install latest PHP package

brew install php@7.2

@saltednut
saltednut / df-ddev.MD
Last active September 27, 2019 21:09
Using DF with DDev

Install Docker if you haven't already. You want the fancy UI version. You can get it via homebrew/cask

brew cask install docker

Now launch the application and wait for it to download/update/run itself.

open /Applications/Docker.app

Pull open the Docker menu from your toolbar and click 'Preferences' then 'Advanced'

Shader "Treesleeper/ThemeColorPickerPulse"
{
Properties
{
_MainTex ("Base Texture", 2D) = "black" {} // Base texture property
[IntRange]_ThemeColorIndex ("Theme Color Index", Range(0, 3)) = 0 // Theme color index property, range limited to 0-3, initialized to 0
[IntRange]_Band("Band", Range(0, 3)) = 0 // Audio link band
[IntRange]_Smooth("Smoothing", Range (1, 15)) = 10 // Audio link smoothing
}