(from Understanding Nginx Server and Location Block Selection Algorithms - https://goo.gl/YyzshP)
server {
| /** | |
| * Implements hook_ctools_plugin_api(). | |
| */ | |
| function workshop_helper_ctools_plugin_api($module, $api) { | |
| if ($module == "ds" && $api == "ds") { | |
| return array("version" => "1"); | |
| } | |
| return NULL; | |
| } |
| #!/bin/bash | |
| # From here: http://www.codingsteps.com/install-redis-2-6-on-amazon-ec2-linux-ami-or-centos/ | |
| # Based on: https://github.com/saxenap/install-redis-amazon-linux-centos | |
| # Thanks to https://raw.github.com/gist/2776679/b4f5f5ff85bddfa9e07664de4e8ccf0e115e7b83/install-redis.sh | |
| # Uses redis-server init script from https://raw.github.com/saxenap/install-redis-amazon-linux-centos/master/redis-server | |
| ############################################### | |
| # To use: | |
| ## wget https://raw.github.com/jorgerc/install-redis-amazon-linux-centos/master/redis-install-script.sh | |
| ## chmod 777 redis-install-script.sh | |
| ## ./redis-install-script.sh |
| /** | |
| * @file | |
| * Testing a demo of Drupal. The script will log in and check for various | |
| * features in Drupal core. This demo was inspired by a similar script for | |
| * a Wordpress site. The original script was written by Henrique Vicente. | |
| * | |
| * @see https://github.com/henvic/phantom-casper-simple-talk/blob/master/wordpress.js | |
| */ | |
| // Set up variables to visit a URL and log in. |
| DELETE | |
| FROM `core_email_queue_recipients` | |
| WHERE `core_email_queue_recipients`.`message_id` NOT IN | |
| ( | |
| SELECT `core_email_queue`.`message_id` | |
| FROM `core_email_queue` | |
| ) |
| //http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript | |
| Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15); |
(from Understanding Nginx Server and Location Block Selection Algorithms - https://goo.gl/YyzshP)
server {
| echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
| . ~/.bashrc | |
| mkdir ~/local | |
| mkdir ~/node-latest-install | |
| cd ~/node-latest-install | |
| curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
| ./configure --prefix=~/local | |
| make install # ok, fine, this step probably takes more than 30 seconds... | |
| curl https://www.npmjs.org/install.sh | sh |
| SetEnvIfNoCase Request_URI "^/status\.php" noauth | |
| AuthType Basic | |
| AuthName "Identify yourself" | |
| AuthUserFile /path/to/.htpasswd | |
| Require valid-user | |
| Order Deny,Allow | |
| Deny from all | |
| Allow from env=noauth |
| #!/bin/bash | |
| #============================================================================== | |
| #TITLE: mysql_backup.sh | |
| #DESCRIPTION: script for automating the daily mysql backups on development computer | |
| #AUTHOR: tleish | |
| #DATE: 2013-12-20 | |
| #VERSION: 0.4 | |
| #USAGE: ./mysql_backup.sh | |
| #CRON: | |
| # example cron for daily db backup @ 9:15 am |
| <?php | |
| namespace Drupal\example\Form; | |
| use Drupal\Core\Form\ConfigFormBase; | |
| use Drupal\Core\Form\FormStateInterface; | |
| /** | |
| * Class AjaxAddMoreForm. | |
| * |