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
#install cmake | |
yum install cmake | |
#install libtool | |
yum install libtool | |
#install a perl pkgconfig requirement | |
yum install perl-ExtUtils-PkgConfig.noarch | |
#get rabbitmq-c library |
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
#To tell RabbitMQ to instruct Erlang to communicate on a certain range of ports, create a file at /etc/rabbitmq/rabbitmq.config with the following contents: | |
[ | |
{kernel, [{inet_dist_listen_min, 9100},{inet_dist_listen_max, 9105}]} | |
]. | |
#Now for the iptables configuration. Update /etc/sysconfig/iptables with the following rules: | |
-A INPUT -m state --state NEW -m tcp -p tcp --dport 5672 -j ACCEPT | |
-A INPUT -m state --state NEW -m tcp -p tcp --dport 4369 -j ACCEPT |
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
tail --bytes=+4 text.txt > text_no_bom.txt |
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
wget http://ipecho.net/plain -O - -q ; echo |
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
$nr_work_days = getWorkingDays('2014-05-01','2014-05-06', null); | |
echo $nr_work_days; | |
/** | |
* Calculate the number of working days between two dates. | |
* Note: The result is inclusive of the start and end date. Given two adjacent weekday dates the result is 2 | |
* Return 0 if the start date is greater than the end date | |
* @param string $startDate Starting date | |
* @param string $endDate End date | |
* @param array $additional_holidays Additional holidays to remove from the calculation |
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
source: http://www.markbrilman.nl/2011/08/howto-convert-a-pfx-to-a-seperate-key-crt-file/ | |
`openssl pkcs12 -in [yourfile.pfx] -nocerts -out [keyfile-encrypted.key]` | |
What this command does is extract the private key from the .pfx file. Once entered you need to type in the importpassword of the .pfx file. This is the password that you used to protect your keypair when you created your .pfx file. If you cannot remember it anymore you can just throw your .pfx file away, cause you won’t be able to import it again, anywhere!. Once you entered the import password OpenSSL requests you to type in another password, twice!. This new password will protect your .key file. | |
Now let’s extract the certificate: | |
`openssl pkcs12 -in [yourfile.pfx] -clcerts -nokeys -out [certificate.crt]` |
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
/* | |
--- | |
script: RandomLogo.class.js | |
description: Cycles through a collection of available logos in a given container. Obviously there should be more | |
available logos than there are logos displayed at only one time | |
requires: | |
- Core | |
- More/Fx.Tween |
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
#http://www.gluster.org | |
#nathan's notes https://gist.github.com/f58f3aa963f2165a0caa | |
#install gluster repo | |
wget -P /etc/yum.repos.d http://download.gluster.org/pub/gluster/glusterfs/LATEST/EPEL.repo/glusterfs-epel.repo | |
#create brick directory | |
[root@re-sw-cen-web1 ~]# mkdir -p /gluster/var-www-html | |
#install client & server software |
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
class Config | |
{ | |
/** | |
*@var array | |
*/ | |
private static $config = null; | |
/** | |
* Returns a config setting. | |
* @param string $name |
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
$setId = $_product->getAttributeSetId(); // Attribute set Id | |
$groups = Mage::getModel('eav/entity_attribute_group') | |
->getResourceCollection() | |
->setAttributeSetFilter($setId) | |
->setSortOrder() | |
->load(); | |
$attributeCodes = array(); | |
foreach ($groups as $group) { | |
if($group->getAttributeGroupName() == 'Somename'){ // set name |
OlderNewer