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/questions/4649356/how-do-i-run-git-log-to-see-changes-only-for-a-specific-branch | |
git cherry -v master | |
# or | |
git log master.. |
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
# DROP INDEX | |
SELECT IF ( | |
EXISTS( | |
SELECT * FROM INFORMATION_SCHEMA.statistics | |
WHERE table_schema = DATABASE() AND TABLE_NAME = '<table_name>' AND index_name LIKE '<index_name>' | |
) | |
,'ALTER TABLE `<table_name>` DROP INDEX `<index_name>`' | |
,'select "index <index_name> does not exist";') INTO @a; | |
PREPARE stmt1 FROM @a; | |
EXECUTE stmt1; |
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
Handlebars.registerHelper("debug", function(optionalValue) { | |
console.log("Current Context"); | |
console.log("===================="); | |
console.log(this); | |
if (optionalValue) { | |
console.log("Value"); | |
console.log("===================="); | |
console.log(optionalValue); | |
} |
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
# Use public IP as per EC2 dashboard | |
ssh ubuntu@54.x.x.x -i ~/.ssh/some_key.pem |
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
# from -> to | |
# Copy to home directory as if web root isn't owned by the "ubuntu" user will get permission denied | |
scp -r -i ~/.ssh/adapt_framework_test.pem /home/carlton/Desktop/work ubuntu@54.x.x.x:/home/ubuntu/ | |
# Move files from home to web root | |
mv /home/ubuntu/ /var/www/html | |
# May have to set permissions on relocated files so the web server can serve them |
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
find /tmp/brightcove-cache/ -type f | wc -l |
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
# IP address | |
ip.addr == 10.43.54.65 | |
ip.src == 10.43.54.65 or ip.dst == 10.43.54.65 |
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
composer require "foo/bar:1.0.0" |
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
# Install Java 7 JDK and create an alias if needed | |
alias selenium_start='java -jar ./selenium-server-standalone-2.48.2.jar' | |
# Useful notes "codeception/codeception": "~2.0" | |
The AcceptanceTester parameter passed into the tests is a class that is generated dynamically, if web driver is used as a module then the web driver functions will be available in the auto complete | |
# Running tests in general | |
http://codeception.com/docs/02-GettingStarted#Running-Tests | |
# Running tests for specific environments |
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
# Search text strings in all files in a folder | |
grep "test" /var/www/ | |
# Recursively | |
grep -R "test" /var/www/ |