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
yum install postgis geos proj --enablerepo=epel | |
yum install postgresql postgresql-server --disablerepo=updates --disablerepo=base | |
============================================== |
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
# The MySQL database server configuration file. | |
# | |
# DESC: InnoDB mainly, heavy queries, fewer connections, 4GB RAM | |
# | |
# Remember to edit /etc/mysql/debian.cnf when changing the socket location. | |
[client] | |
port = 3306 | |
socket = /var/run/mysqld/mysqld.sock | |
# This was formally known as [safe_mysqld]. Both versions are currently parsed. |
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
1. to install a egg | |
easy_install http://arshaw.com/scrapemark/downloads/scrapemark-0.9-py2.7.egg | |
2. make | |
2.1 install ez_setup.py | |
https://pypi.python.org/pypi/setuptools |
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
// Recursive String Replace - recursive_array_replace(mixed, mixed, array); | |
function recursive_array_replace($find, $replace, $array){ | |
if (!is_array($array)) { | |
return str_replace($find, $replace, $array); | |
} | |
$newArray = array(); | |
foreach ($array as $key => $value) { | |
$newArray[$key] = recursive_array_replace($find, $replace, $value); | |
} | |
return $newArray; |
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 | |
* This file is empty by default because the base theme chain (Alpha & Omega) provides | |
* all the basic functionality. However, in case you wish to customize the output that Drupal | |
* generates through Alpha & Omega this file is a good place to do so. | |
* | |
* Alpha comes with a neat solution for keeping this file as clean as possible while the code | |
* for your subtheme grows. Please read the README.txt in the /preprocess and /process subfolders |
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
drush php-eval 'node_access_rebuild();' |
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 | |
// Author: John Wright | |
// Website: http://johnwright.me/blog | |
// This code is live @ | |
// http://johnwright.me/code-examples/sparql-query-in-code-rest-php-and-json-tutorial.php | |
function getUrlDbpediaAbstract($term) | |
{ | |
$format = 'json'; |
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
# | |
# The MySQL database server configuration file. | |
# | |
# You can copy this to one of: | |
# - "/etc/mysql/my.cnf" to set global options, | |
# - "~/.my.cnf" to set user-specific options. | |
# | |
# One can use all long options that the program supports. | |
# Run program with --help to get a list of available options and with | |
# --print-defaults to see which it would actually understand and use. |
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 | |
function node404_menu_site_status_alter(&$menu_site_status, $path) { | |
// Allow access to my_module/authentication even if site is in offline mode. | |
$exceptions = array('add', 'edit'); | |
$item = menu_get_item(); | |
// for node/% paths | |
if ($item['original_map'][0] == 'node' && isset($item['original_map'][1])) { | |
if (!is_numeric($item['original_map'][1]) && !in_array($item['original_map'][1], $exceptions)) { |
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
/** | |
* Adds method arg to the Drupal object for grabbing url args | |
* | |
* @author Aaron Klump, In the Loft Studios, LLC | |
* @see http://www.intheloftstudios.com | |
* @see http://gist.github.com/3078482 | |
* | |
* For use in a theme or module add the following to your .info file | |
* @code | |
* scripts[] = [path to js dir]/drupal.arg.js |