This file contains 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
filepath="/home/testuser/MyRadio.jpg" | |
myfilehash=$(sha1sum $filepath) | |
echo "File Sha1 Value is $myfilehash" | |
myfilehash=$(md5sum $myfilepath) | |
echo "File MD5 Value is $myfilehash" |
This file contains 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
$ git clone http://github.com/resmo/git-ftp.git | |
$ cd git-ftp | |
$ git checkout master | |
$ sudo make install |
This file contains 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
var url = "http://example.com/index.htm"; | |
var filename = url.match(/([^\/]+)(?=\.\w+$)/)[0]; |
This file contains 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
<config> | |
<fields name="params"> | |
<fieldset name="basic" label="Module Parameters" description="Module settings"> | |
<field size="10" name="youtube_url" type="text" default="200" label="Youtube Video URL" description="" /> | |
<field size="10" name="height" type="text" default="315" label="Height" description="" /> | |
<field size="10" name="width" type="text" default="560" label="Width" description="" /> | |
</fieldset> | |
</fields> |
This file contains 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 | |
$app =& JFactory::getApplication(); | |
if ($app->isAdmin()) { | |
echo "we are in the administrator"; | |
} else { | |
echo "we are in the frontend site"; | |
} |
This file contains 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 "Secure Area" | |
AuthType Basic | |
AuthUserFile /home/adidac/.htpasswd | |
require valid-user |
This file contains 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
$ sudo apt-get install phpunit | |
$ sudo pear upgrade pear | |
$ sudo pear channel-discover pear.phpunit.de | |
$ sudo pear channel-discover components.ez.no | |
$ sudo pear channel-discover pear.symfony-project.com | |
$ sudo pear install --alldeps phpunit/PHPUnit | |
$ sudo apt-get install curl libcurl3 libcurl3-dev php5-curl | |
$ sudo apt-get install libssh2-1-dev libssh2-php | |
This file contains 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
jimport( 'joomla.application.module.helper' ); | |
$module = JModuleHelper::getModule('mod_jogajog'); | |
$params = new JRegistry; | |
$params->loadString($module->params, 'JSON'); | |
echo '<pre>'; | |
print_r($params); | |
echo '</pre>'; | |
This file contains 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
let say your username is adidac | |
$ sudo add user adidac www-data | |
$ sudo chown -R www-data:www-data /var/www/ | |
$ sudo chmod -R g+rw /var/www/ | |
This file contains 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
if(typeof String.prototype.trim !== 'function') { | |
String.prototype.trim = function() { | |
return this.replace(/^\s+|\s+$/g, ''); | |
} | |
} |