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/sh | |
### BEGIN INIT INFO | |
# Provides: elasticsearch | |
# Required-Start: $all | |
# Required-Stop: $all | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Starts elasticsearch | |
# Description: Starts elasticsearch using start-stop-daemon | |
### END INIT INFO |
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 | |
// Em resposta à essa imagem: | |
// https://fbcdn-sphotos-a.akamaihd.net/hphotos-ak-ash4/305534_10150769324963360_290539813359_9393694_635337580_n.jpg | |
class Baba implements arrayaccess { | |
private $counter = 0; | |
public function offsetSet($offset, $value) { | |
// |
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://drakos7.net/2012/02/installing-php-5-4-0rc8-and-apache-2-4-on-ubuntu-11-10 | |
apt-get update | |
apt-get -y -q install make g++ flex bison build-essential zlib1g-dev binutils \ | |
cmake automake autoconf libmcrypt-dev libmhash-dev libxslt1-dev \ | |
libtidy-dev libbz2-dev libxml2-dev libssl-dev libmysqlclient16 libmysqlclient16-dev \ | |
libpng12-dev libpng12-0 libpng3 libjpeg62 libjpeg62-dev libxpm-dev libpcre3 \ | |
libpcre3-dev zlib1g zlib1g-dev libltdl-dev libltdl7 pkg-config \ | |
libcurl4-openssl-dev libfreetype6 libfreetype6-dev libc-client2007e \ | |
libc-client2007e-dev libkrb5-3 libkrb5-dev openssl libglobus-openssl \ |
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
# crédito http://brunitto.wordpress.com/2011/10/15/tutorial-instalando-o-mysql-5-5-16-no-ubuntu-server-11-10/ | |
mkdir /opt/src | |
cd /opt/src | |
curl -O http://linorg.usp.br/mysqlDownloads/MySQL-5.5/mysql-5.5.22.tar.gz | |
apt-get install gcc g++ make cmake autoconf | |
apt-get install libaio1 libaio-dev | |
apt-get install libncurses5-dev | |
tar --extract --gzip --file mysql-5.5.22.tar.gz | |
cd mysql-5.5.22 | |
cmake . |
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 | |
function calcular_moedas($valor) { | |
$moedas_disponiveis = array(0.5, 0.25, 0.1, 0.05, 0.01); | |
$quantidade_moedas = array(); | |
$soma = 0.0; | |
foreach($moedas_disponiveis as $moeda) { | |
while($valor > ($soma + $moeda)) { | |
if(!isset($quantidade_moedas["{$moeda}"])) { |
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 | |
namespace App\BackendBundle\Controller; | |
use Symfony\Bundle\FrameworkBundle\Controller\Controller; | |
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method; | |
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; | |
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; | |
use Symfony\Component\Security\Core\SecurityContext; |
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 yum install php53u php53u-cli php53u-gd php53u-common php53u-devel php53u-mbstring php53u-mysql php53u-pdo php53u-pecl-apc php53u-pecl-apc-debuginfo php53u-xml php53u-xmlrpc php53u-intl git-all |
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
export PATH=$HOME/local/bin:$PATH | |
#colors | |
export CLICOLOR=1 | |
export LSCOLORS=GxFxCxDxegedabagaced | |
#customize output shel | |
parse_git_branch () { | |
git name-rev HEAD 2> /dev/null | sed 's#HEAD\ \(.*\)#(git \1)#' | |
} |
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
$j(document).ready(function() { | |
counter_img = 1; | |
setInterval(function() { | |
if(++counter_img > 4) { | |
counter_img = 1; | |
} | |
$j('#topo > h1').animate({ | |
opacity: '0.8' |
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 | |
namespace App; | |
use Restsym/Controller; | |
use Restsym/Controller/RespondTo; | |
use App/News/Repository as DataNews; | |
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; |