First run ./stream_parser
as described in this article and the use the following script.
Good luck, you need it.
function findPosterLink(baseElement) { | |
if ( !baseElement ) { | |
return false; | |
} | |
// console.warn('findPosterLink'); | |
var linkCells = baseElement.getElementsByClassName('torrents'); | |
if ( linkCells.length ) { | |
var linkElem = linkCells[0].getElementsByTagName('a'); |
Mac installation notes (tested under MacOS 10.9.5), assuming VirtualBox is already installed on host.
Each machine that has Apple's XCode installed has also XDebug, so we don't need to add it with pecl, brew, macports, or any similar package manager, simply add it to your php.ini
file!
To simply do it, I give you this one-liner solution:
sudo sh -c 'echo zend_extension=$(find /usr/lib/php/extensions -name "xdebug.so") >> $(php -qr "echo php_ini_loaded_file();") && apachectl restart'
If you're familiar with bash you probably have already understood, but if you need extra info about what's happening (and you should) there's the explaination:
#!/bin/sh | |
# | |
# WARNING: The content of this script might be outdated! | |
# | |
# This was the initial developement, now the script can be found on github: | |
# https://github.com/esolitos/drupal-utility/blob/master/bin/reconfig-local-drupal | |
# | |
drush_cmd=`which drush` |
Note: Since I believe that sudo
it's evil (contact me fore more info about it) I'm not going to assume that all the commands are run as root
, ese at your own risk. Remember, with great powers...
In this part we will egnerate the key and the certificate for the CA, that are going to be used asto issue the device certificates.
Step 0. Move in a secure location: #: mkdir /root/certs/CA && cd /root/certs/CA
Step 1. Gen. CA Key: #: openssl genrsa -des3 -out rootCA.key 2048
# Disable default core modules that probably are not required (I suggest running also `drush pm-uninstall -y` on the same module list) | |
drush dis -y toolbar overlay color comment dashboard dblog help rdf | |
# Enable most used modules | |
drush en -y absolute_messages admin_views backup_migrate chosen ckeditor ckeditor_link save_edit module_filter page_manager field_ui image link field_collection entityreference email ds_ui date_views date_popup path pathauto globalredirect node navbar list options taxonomy features field_group media l10n_update date focal_point menu rules_admin strongarm views_ui jquery_update redirect transliteration ultimate_cron variable | |
# In case you are developing the site you can also enable those modules | |
drush en -y devel devel_contrib ds_devel metatag_devel performance |
This config assumes that: | |
- `platform.settings.php` is placed in the `sites/` directory | |
- you have a `sites/files` directory in your drupal installation. | |
- you have a `ramsalt` user that can access all your databases starting with `ramsalt_` | |
- the files on the "live" site are placed in the drupal's default directory: `sites/hostname.tld/files` |
# While inside a drupal site directory creates a SQL backup with the name of the site's directory and the current date. | |
drush sql-dump | gzip > ~/SQL-Backup/${PWD##*/}.$(date +%y%m%d).gz | |
# More advanced example: | |
# From the `drupal/sites` directory do a SQL backup of all the sites available | |
for dir in $(ls | egrep -v 'all|default'); do | |
if [ -d $dir ]; then | |
cd $dir | |
echo "Backup of site: $dir" | |
drush sql-dump | gzip > ~/SQL/${pwd##/}.$(date +%Y-%m-%d).gz |
<?php | |
if ( isset($_SERVER['HTTP_ACCEPT_LANGUAGE']) && strlen($_SERVER['HTTP_ACCEPT_LANGUAGE']) >= 2 ) | |
{ | |
$allowLang = array('en', 'it', 'de', 'fr'); | |
$base_url = $_SERVER['HTTP_HOST'] . rtrim(dirname($_SERVER['PHP_SELF']), '/\\'); | |
$lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2); | |
if ( !in_array($lang, $allowLang) ) { | |
$lang = 'en'; | |
} |