Skip to content

Instantly share code, notes, and snippets.

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
}
@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'

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

[~]$ 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
@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;
#!/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
#!/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
@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"}'
@saltednut
saltednut / keybase.md
Last active September 23, 2020 14:51

Keybase proof

I hereby claim:

  • I am saltednut on github.
  • I am saltednut (https://keybase.io/saltednut) on keybase.
  • I have a public key ASCC3DswrEX_rnZQZKTXSA-hYef_J0GGBPvEpnCXl-k1Nwo

To claim this, I am signing this object:

@saltednut
saltednut / remove-web-tools.sh
Last active February 10, 2020 13:00
Remove MySQL and turn off Apache in OSX
sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist
sudo rm /usr/local/mysql
sudo rm -rf /usr/local/mysql*
sudo rm -rf /Library/StartupItems/MySQLCOM
sudo rm -rf /Library/PreferencePanes/My*
rm -rf ~/Library/PreferencePanes/My*
sudo rm -rf /Library/Receipts/mysql*
sudo rm -rf /Library/Receipts/MySQL*
sudo rm -rf /var/db/receipts/com.mysql.*