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
| # | |
| # Apache/PHP/Drupal settings: | |
| # | |
| # Protect files and directories from prying eyes. | |
| <FilesMatch "\.(engine|inc|info|install|make|module|profile|test|po|sh|.*sql|theme|tpl(\.php)?|xtmpl)(~|\.sw[op]|\.bak|\.orig|\.save)?$|^(\..*|Entries.*|Repository|Root|Tag|Template)$|^#.*#$|\.php(~|\.sw[op]|\.bak|\.orig\.save)$"> | |
| Order allow,deny | |
| </FilesMatch> | |
| # Don't show directory listings for URLs which map to a directory. |
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 | |
| if [[$BRANCH == '']]; then | |
| GIT_BRANCH = "master" | |
| else | |
| GIT_BRANCH = $BRANCH | |
| if | |
| if [ -d "/tmp/clone/"]; then | |
| rm -rf "/tmp/clone" |
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 | |
| $databases = array ( | |
| 'default' => | |
| array ( | |
| 'default' => | |
| array ( | |
| 'database' => 'uat_iapo_drupal', | |
| 'username' => 'uat_dba', | |
| 'password' => '3W5LcJQv26DpxGMm', |
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
| server { | |
| server_name [host]; | |
| root /var/www/[document_root]; ## <-- Your only path reference. | |
| # Enable compression, this will help if you have for instance advagg module | |
| # by serving Gzip versions of the files. | |
| gzip_static on; | |
| location = /favicon.ico { |
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 | |
| while read p; do | |
| if [ -d "/home/$p" ]; then | |
| echo $p | |
| if [ -d "/home/$p/public_html" ]; then | |
| cd /home/$p/public_html | |
| git init | |
| git add . | |
| git commit -am "first commit" |
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
| $aliases['site.vm'] = array( | |
| 'env' => 'dev', | |
| 'site' => 'site', | |
| 'uri' => 'site.vm', | |
| 'root' => '/vagrant/www', | |
| 'remote-host' => 'site.vm', | |
| 'remote-user' => 'vagrant', | |
| 'ssh-options' => '-i ~/Clients/site/puphpet/files/dot/ssh/id_rsa', | |
| 'command-specific' => array( | |
| 'sql-dump' => 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 | |
| /** | |
| * @file | |
| * Demo module, Basic Ajax form submit (Ajax framework). | |
| */ | |
| /** | |
| * Implements hook_menu(). | |
| */ |
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
| $collections = array(); | |
| $field_collection_fields = field_get_items('node', $node, 'field_services'); | |
| $ids = array(); | |
| // Extract the field collection item ids | |
| $ids = array(); | |
| foreach ($field_collection_fields as $fc_field) { | |
| $ids[] = $fc_field['value']; | |
| } |
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 | |
| $adam = array( | |
| 'remote-host' => 'adammalone.net', | |
| 'root' => '/var/www/html/adammalone/docroot', | |
| 'uri' => 'adammalone.net', | |
| 'strict' => 0, | |
| 'path-aliases' => array( | |
| '%dump-dir' => '/home/adammalone/.drush/dumps', | |
| '%files' => 'sites/default/files', |
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
| function distanceGeoPoints ($long1, $lat1, $long2, $lat2) { | |
| $lat = deg2rad($lat2 - $lat1); | |
| $long = deg2rad($long2 - $long1); | |
| $a = sin($lat/2) * sin($lat/2) + cos(deg2rad($lat1)) * cos(deg2rad($lat2)) * sin($long/2) * sin($long/2); | |
| $c = 2 * atan2(sqrt($a), sqrt(1 - $a)); | |
| $d = 6371 * $c; | |
| return $d; | |
| } |