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
@servers(['production' => 'productionserver', 'local'=> 'vagrant@127.0.0.1 -p 2222']) | |
{{-- Configuration section --}} | |
@setup | |
/* | |
|-------------------------------------------------------------------------- | |
| Git Config | |
|-------------------------------------------------------------------------- | |
| |
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
select device_token, count("id") as counter from deviceinfo GROUP BY device_token ORDER BY counter desc |
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
SET @DATABASE_NAME = 'name_of_your_db'; | |
SELECT CONCAT('ALTER TABLE `', table_name, '` ENGINE=InnoDB;') AS sql_statements | |
FROM information_schema.tables AS tb | |
WHERE table_schema = @DATABASE_NAME | |
AND `ENGINE` = 'MyISAM' | |
AND `TABLE_TYPE` = 'BASE TABLE' | |
ORDER BY table_name DESC; |
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
// No configuration needed, will automatically find the Apache log folder and read error.log | |
// Initialy displays the last 2k of contents and auto updates (and auto scrolls) as new lines show up | |
// Can enter a search phrase in the UI to ignore any new lines that do (or don't) contain the phrase | |
$tail = new PHPTail(GetApacheLogPath()); | |
if(isset($_GET['ajax'])) { //We're getting an AJAX call | |
echo $tail->getNewLines($_GET['lastsize'], $_GET['grep'], $_GET['invert']); | |
exit(); | |
} | |
// Regular GET/POST call, print out the GUI |
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 | |
sed 's^\[.*\]^^g' error.log | sed 's^\, referer: [^\n]*^^g' | sort | uniq -c | sort -n |