The following scripts assist in purging and stopping the build up of binary logs by MySQL see http://technology.blue-bag.com/binary-logs-are-filling-my-mac-help
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# <type>(<scope>): <subject> | |
#|<---- Using a Maximum Of 50 Characters ---->| | |
# <body> | |
#|<---- Try To Limit Each Line to a Maximum Of 72 Characters ---->| | |
# <footer> | |
# Example: Closes #23 | |
# --- COMMIT END --- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mysql -u root | |
SELECT PASSWORD('MYFANCYPASSWORD') | |
copy the output hash * and all. | |
CREATE USER 'myfancyusername'@'%' IDENTIFIED BY PASSWORD '*HASH'; | |
GRANT ALL PRIVILEGES ON *.* TO 'myfancyusername'@'%' WITH GRANT OPTION; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This will redirect the page on form load to: $base_url/node?search=FOO&reset | |
$form_state['redirect'] = array( | |
'node', | |
array( | |
'query' => array( | |
// adds to url: ?search=FOO | |
'search' => $var, | |
// adds to url: &reset | |
'reset' => NULL, | |
), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Help menu | |
print_help() { | |
cat <<-HELP | |
This script is used to fix permissions of a Drupal installation | |
you need to provide the following arguments: | |
1) Path to your Drupal installation. | |
2) Username of the user that you want to give files/directories ownership. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find ~ -type d -name .git -exec dirname {} \; | tr '\n' '\000' | xargs -0 -n1 -I % git -C "%" status |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env bash | |
# Variables | |
APPENV=local | |
DBHOST=localhost | |
DBNAME=dbname | |
DBUSER=dbuser | |
DBPASSWD=test123 | |
echo -e "\n--- Mkay, installing now... ---\n" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Build Zsh from sources on Ubuntu. | |
# From http://zsh.sourceforge.net/Arc/git.html and sources INSTALL file. | |
# Some packages may be missing | |
sudo apt-get install -y git-core gcc make autoconf yodl libncursesw5-dev texinfo | |
git clone git://git.code.sf.net/p/zsh/code | |
cd zsh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$page = new stdClass(); | |
$page->disabled = FALSE; /* Edit this to true to make a default page disabled initially */ | |
$page->api_version = 1; | |
$page->name = 'access_denied'; | |
$page->task = 'page'; | |
$page->admin_title = 'Access Denied (403)'; | |
$page->admin_description = ''; | |
$page->path = 'access-denied'; | |
$page->access = array(); | |
$page->menu = array(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Implementation of hook_provision_apache_vhost_config() | |
*/ | |
function php5fpm_provision_apache_vhost_config($uri, $data) { | |
$plat = d()->root; | |
return "ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000" . $plat . "/$1"; | |
} | |
?> |