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 phpdismod xdebug | |
sudo phpdismod -v 7.4 xdebug #disable | |
sudo phpenmod -v 7.4 xdebug #enable | |
sudo service php7.4-fpm restart && sudo service nginx restart |
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
#Change branch in Forge UI | |
#then on console in project folder | |
git checkout -b branch_name | |
#Edit vim .git/config | |
#change [remote "origin"] section just the branch name | |
git fetch --all | |
git branch merge/devtasks --set-upstream-to origin/branch_name | |
git pull origin branch_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
/* | |
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 | |
*/ |
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
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
#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
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
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
#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
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" |
NewerOlder