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
| # download a copy of current version and new updated drupal software. | |
| drush dl drupal-<<original verion>> | |
| drush dl drupal-<<new version>> | |
| # Use diff to create a patch of directories. | |
| diff -urN drupal-<<original verion>> drupal-<<new version>> > drupal-<<orig>>-to-<<new>>.patch |
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
| /* | |
| Getting “warning: Table 'dbname.semaphore' doesn't exist query: SELECT expire, value FROM semaphore” | |
| when updating DB or running Drush commands. | |
| Try running this query on your database. | |
| */ | |
| CREATE TABLE semaphore ( `name` VARCHAR(255) NOT NULL DEFAULT '', `value` VARCHAR(255) NOT NULL DEFAULT '', `expire` DOUBLE NOT NULL, PRIMARY KEY (name), INDEX expire (expire) ) /*!40100 DEFAULT CHARACTER SET UTF8 */ |
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
| # Begin Leverage Browser Caching | |
| <IfModule mod_expires.c> | |
| # Enable expirations | |
| ExpiresActive on | |
| # Default directive | |
| ExpiresDefault "access plus 1 hour" | |
| # Favicon |
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/local/apache/current/logs/access_log | |
| /usr/local/apache/current/logs/error_log | |
| /usr/local/apache/current/ssl_engine_log | |
| /usr/local/apache/current/ssl_scache.pag { | |
| rotate 3 | |
| compress | |
| missingok | |
| size 15M | |
| postrotate | |
| /usr/bin/killall -HUP /usr/local/apache/current/bin/httpd |
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
| AuthName "Protected Access" | |
| AuthType Basic | |
| AuthBasicProvider ldap | |
| AuthzLDAPAuthoritative off | |
| AuthLDAPURL ldap://server.fqdn/cn=users,dc=<domain>,dc=com?uid | |
| require valid-user | |
| ## The user should be a member of a certain group: | |
| # AuthLDAPGroupAttribute memberUid | |
| # AuthLDAPGroupAttributeIsDN off | |
| # require ldap-group cn=<group>,cn=groups,dc=<domain>,dc=com |
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
| #conditional logging | |
| # Create exclusions in apache logs | |
| SetEnvIf Request_URI "^/favicon\.ico$" special | |
| SetEnvIf Request_URI "something.html" special | |
| # no logging: | |
| CustomLog /var/log/httpd/local-access.log combined env=!special | |
| # explicit logging: |
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
| # Change Allow apps downloaded from Preference | |
| # Change Gatekeeper to “Mac App Store and identified developers” preference. | |
| sudo spctl --enable --label "Developer ID" |
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/python | |
| '''Uses Cocoa classes via PyObjC to set a desktop picture on all screens. | |
| Tested on Mountain Lion and Mavericks. Forked from https://gist.github.com/hunty1/548edaf7e913c8f4e06b, | |
| which was inspired by Greg Neagle's work: https://gist.github.com/gregneagle/6957826 | |
| See: | |
| https://developer.apple.com/library/mac/documentation/cocoa/reference/applicationkit/classes/NSWorkspace_Class/Reference/Reference.html | |
| https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSURL_Class/Reference/Reference.html |
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
| # Optimized MySQL configuration by Fotis Evangelou - Updated Jan 2016 | |
| # | |
| # The settings provided below are a starting point for a 4GB-8GB RAM server with 4 CPU cores. | |
| # If you have less or more resources available you MUST adjust accordingly to save CPU, RAM and disk I/O usage. | |
| # To fine tune these settings for your system, use MySQL DB diagnostics tools like: | |
| # https://launchpad.net/mysql-tuning-primer | |
| # or | |
| # http://blog.mysqltuner.com/download/ | |
| # Note that if there is no comment beside a setting, then you don't need to adjust it. |
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 | |
| # Convert Markdown to Wordpress blogging format | |
| # Required program(s) | |
| req_progs=(ascii2uni pandoc) | |
| for p in ${req_progs[@]}; do | |
| hash "$p" 2>&- || \ | |
| { echo >&2 " Required program \"$p\" not installed."; exit 1; } | |
| done |