Edit corresponding file in /etc/nginx/sites-enabled and change # try_files $uri $uri/ /index.php?$args; to try_files $uri $uri/ /index.php?q=$request_uri;
| [client] | |
| host= | |
| user= | |
| password= | |
| database= |
| // Replaces /administrator/components/com_feedgator/helpers/feedgator.helper.php:303-308 | |
| if ($fgParams->get('save_feed_cats')) { | |
| if ($categories = $item->get_categories()) { | |
| foreach ($categories as $category) { | |
| $metakey[] = $category->get_label(); | |
| } | |
| } | |
| $content['metakey'] .= implode(', ', $metakey); | |
| } |
| usort($this->item->tags, function ($a, $b) { | |
| return strcmp(strtolower($a->name), strtolower($b->name)); | |
| }); |
| Change | |
| #!/bin/sh | |
| to | |
| #!/bin/bash |
| update [table_name] set [field_name] = replace([field_name],'[string_to_find]','[string_to_replace]'); | |
| update jos_content set `fulltext` = replace(`fulltext`,'foo','bar') | |
| See: http://stackoverflow.com/questions/7615659/sql-fulltext-returning-null |
WARNING: This procedure may have adverse side effects. You have been warned!
As the latest official version of PHP supported by Ubuntu 12.04 is 5.3.10, you need to add an external source for more recent versions. The source used is Dotdeb. "The packages from Dotdeb should work on Ubuntu, but no additional support will be provided." - http://www.dotdeb.org/about/
Add Dotdeb as package sources
$ sudo nano /etc/apt/sources.list and add:
deb http://php53.dotdeb.org squeeze alldeb-src http://php53.dotdeb.org squeeze all
Important: The contents of Personal Package Archives are not checked or monitored. You install software from them at your own risk. This PPA is maintained by the Ubuntu Git Maintainers team. https://launchpad.net/~git-core/+archive/ppa
$ sudo add-apt-repository ppa:git-core/ppa If you get a sudo: add-apt-repository: command not found error, then you need to run
$ sudo apt-get install python-software-properties
$ sudo apt-get update
$ sudo apt-get upgrade
A Pen by Matt Thomas on CodePen.
Adds touch support to CSS Suckerfish menus
| $string = "Mary had a little lamb :#$"; | |
| $length = strlen($string); | |
| $regex = "/[^a-z0-9]/i"; | |
| for ($i = 1; $i <= $length; $i++) { | |
| if (preg_match($regex, substr($string, $length - 1, 1))) { | |
| $string = substr($string, 0, $length - 1); | |
| $length = $length - 1; | |
| } else { | |
| break; |