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
I was not able to get mongo 2.6.1 and elasticsearch 1.1.1 running with the 2.0.0 river plugin, so i went with mongo 2.4.9 and es 1.0.3 and the 2.0.0 river plugin | |
#install mongo | |
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10 | |
echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list | |
sudo apt-get update | |
#sudo apt-get install mongodb-org | |
sudo apt-get install mongodb-10gen | |
sudo apt-get install mongodb-10gen=2.4.9 | |
echo "mongodb-10gen hold" | sudo dpkg --set-selections |
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
#vagrant box: box: puphpet/ubuntu1204-x64 | |
# box_url: puphpet/ubuntu1204-x64 | |
#From: http://debian.neo4j.org/ | |
#Neo Technology provides this Debian repository, to make it easy to install Neo4j. There are 3 repositories: | |
#testing | |
# Milestone builds for the upcoming Neo4j release. | |
#stable | |
# The current stable Neo4j release. You should choose this by default. | |
#oldstable |
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
You can also issue the line below straight from the Command Prompt: | |
FOR /F "tokens=*" %G IN ('DIR /B /AD /S *.svn*') DO RMDIR /S /Q "%G" |
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
#Add the Tokutek package signing key. | |
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key 505A7412 | |
#Add an entry for the TokuMX package repository for your release (wheezy, precise, quantal, raring, saucy, or trusty). | |
echo "deb [arch=amd64] http://s3.amazonaws.com/tokumx-debs $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/tokumx.list | |
#Update apt and install TokuMX. | |
sudo apt-get update | |
sudo apt-get install tokumx | |
mongo |
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\(isset\(\$_SESSION\[("|')regr("|')\]\[("|')([a-zA-Z_]+)("|')\]\)\)(| )echo \$_SESSION\[("|')regr("|')\]\[("|')([a-zA-Z_]+)("|')\] | |
if(Session::has('regr.$4'))echo Session::get('regr.$4') | |
//AnotherOne | |
if\(\$_POST\['([a-zA-Z_]+)'\]\!\=''\)\{\$_SESSION\["regr"\]\['([a-zA-Z_]+)'\] \= \$_POST\['([a-zA-Z_]+)'\]; | |
}else{$mensaje.='Falto Nombre Completo del distribuidor';$continua=false;} | |
if(Request::has('$1') && Request::input('$1')!=''){Session::put('regr.$1', Request::input('$1') ) ; } //replace |
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
Boot up an ubuntu instance ( I used ubuntu-trusty-14.04-amd64-server-20150325 (ami-df6a8b9b) ) | |
———- Installing Apache ———- | |
$ sudo apt-get install apache2 | |
———- Installing Latest PHP ———- | |
$ sudo add-apt-repository ppa:ondrej/php5 | |
$ sudo apt-get update | |
$ sudo apt-get install php5 libapache2-mod-php5 | |
———- Installing PHP Mcrypt ext. ———- | |
$ sudo apt-get install php5-mcrypt |
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://stackoverflow.com/a/20120264 | |
#where server_name stands for name of the server in PhpStorm project conifuguration | |
$ XDEBUG_CONFIG="idekey=PHPSTORM" PHP_IDE_CONFIG="serverName=server_name" php -dxdebug.remote_host=`echo $SSH_CLIENT | cut -d "=" -f 2 | awk '{print $1}'` artisan command |
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 | |
Source = MySQL.Database("127.0.0.1:33060", "dbname", [ReturnSingleDatabase=true]), | |
table = Source{[Schema="dbname",Item="location_logs"]}[Data], | |
#"Added Conditional Column1" = Table.AddColumn(table, "location_name", | |
each if [locatable_type] = "condition_one" then ( | |
let conditionOneID = [locatable_id] in | |
Table.SelectRows(#"dbname source_table_one", each [id] = conditionOneID) | |
){0}[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
<?php | |
namespace App\Http\Controllers; | |
use Illuminate\Http\Request; | |
use Illuminate\Support\Facades\Storage; | |
use League\Flysystem\Filesystem; | |
class S3PresignedURIController extends Controller | |
{ |
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
/* | |
THE SETUP: | |
An "order_status_logs" table with the following columns: order_id, status_id, created_at | |
There is no constraint for order_id and status_id so you can have the same order and status multiple times on "order_status_logs" | |
THE OBJECTIVE: | |
A query that returns the order_status_logs records that have duplicates (same order_id and status_id) for a known status_id | |
*/ |
OlderNewer