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
PackageInfo info; | |
try { | |
info = getPackageManager().getPackageInfo("ecentinela.mercadotes", PackageManager.GET_SIGNATURES); | |
for (Signature signature : info.signatures) { | |
MessageDigest md; | |
md = MessageDigest.getInstance("SHA"); | |
md.update(signature.toByteArray()); |
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
cd /Applications/MAMP/bin | |
ln -s php5.3 php5 | |
php5/bin/pear channel-discover pear.phpunit.de | |
php5/bin/pear channel-discover components.ez.no | |
php5/bin/pear channel-discover pear.symfony-project.com | |
php5/bin/pear channel-update pear.php.net | |
php5/bin/pear upgrade pear | |
php5/bin/pear install phpunit/PHPUnit | |
ln -s /Applications/MAMP/bin/php5/bin/phpunit /usr/local/bin/phpunit | |
phpunit --version |
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 brew | |
/usr/bin/ruby -e "$(curl -fsSL https://raw.github.com/gist/323731)" | |
# install imagemagick | |
brew install imagemagick | |
# install imagick | |
brew install imagick | |
# if giving errors on the installation, comment the content on ~/.bash_profile or ~/.profile, open a new terminal and retry |
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
#!/bin/bash | |
set -e | |
export INSTANCE_ID=`wget -q -O - http://169.254.169.254/latest/meta-data/instance-id` | |
export VOLUME_ID=v-12345678 | |
export EC2_URL=https://ec2.us-east-1.amazonaws.com | |
export EC2_ACCESS_KEY=[key id] | |
export EC2_SECRET_KEY=[key] | |
sudo apt-get install scrub | |
euca-attach-volume -i $INSTANCE_ID -d /dev/sdj $VOLUME_ID |
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 express = require('express'), | |
app = express(), | |
cookieParser = require('cookie-parser'), | |
session = require('express-session'), | |
RedisStore = require('connect-redis')(session); | |
app.use(express.static(__dirname + '/public')); | |
app.use(function(req, res, next) { | |
if (~req.url.indexOf('favicon')) | |
return res.send(404); |
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
$this | |
->getContainer() | |
->get('mailer') | |
->getTransport() | |
->getSpool() | |
->flushQueue( | |
$this | |
->getContainer() | |
->get('swiftmailer.transport.real') | |
); |
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
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain 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
<?php | |
/** | |
* Turn all URLs in clickable links. | |
* | |
* @param string $value | |
* @param array $protocols http/https, ftp, mail, twitter | |
* @param array $attributes | |
* @param string $mode normal or all | |
* @return string | |
*/ |
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
Ant-Task which runs behat: | |
<?xml version="1.0" encoding="UTF-8"?> | |
<project name="Foo" default="build" basedir="."> | |
.... | |
<target name="behat"> | |
<exec dir="${basedir}/" executable="php" failonerror="true"> |
NewerOlder