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
Activating mysql logs to see what tables are being used is very helpful when reverse engineering something. | |
To find your log location run the following | |
``` | |
SHOW VARIABLES LIKE '%general_log%'; | |
SHOW VARIABLES LIKE '%slow_query_log%'; | |
``` | |
If logs appear off you can turn on with: |
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 service mysql start | |
$ cd /var/run | |
--// Back the sock | |
$ sudo cp -rp ./mysqld ./mysqld.bak | |
$ sudo service mysql stop |
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 | |
# If you would like to do some extra provisioning you may | |
# add any commands you wish to this file and they will | |
# be run after the Homestead machine is provisioned. | |
# Update app-get | |
sudo apt-get update |
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 apt-get install zsh -y | |
git clone git://github.com/robbyrussell/oh-my-zsh.git /home/vagrant/.oh-my-zsh | |
cp /home/vagrant/.oh-my-zsh/templates/zshrc.zsh-template /home/vagrant/.zshrc | |
sudo chsh -s /usr/bin/zsh vagrant | |
sed -i 's/robbyrussell/afowler/g' /home/vagrant/.zshrc |
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
bash: | |
function coolness() { | |
ssh -q [email protected] -p 2222; | |
ret=$?; | |
if [ $ret -eq 255 ]; then | |
cd ~/Public/Homestead/; | |
vagrant up; |
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
Using nginx version: nginx/1.6.2 and Laravel 5 | |
In the controller: | |
use Symfony\Component\HttpFoundation\StreamedResponse; | |
- - - - - - Some method - - - - - - - - - | |
$response = new StreamedResponse(); | |
$response->headers->set('Content-Type', 'text/event-stream'); | |
$response->headers->set('Cache-Control', 'no-cache'); | |
$response->setCallback( | |
function() { |