This file contains hidden or 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
| VBoxManage controlvm boot2docker-vm natpf1 "name,tcp,127.0.0.1,8080,,8080" |
This file contains hidden or 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
| mysql -u [user name] -p [db name] -B -e "[select query]"| sed "s/'/\'/;s/\t/\",\"/g;s/^/\"/;s/$/\"/;s/\n//g" > output.csv |
This file contains hidden or 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
| :2,$ s/^/\=printf('%d,', (line('.') - 1)) |
This file contains hidden or 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
| First change the following line in /etc/sshd/sshd_config | |
| from: | |
| PermitRootLogin yes | |
| to: | |
| PermitRootLogin no | |
| Then restart the service: | |
| either |
This file contains hidden or 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
| CriteriaQuery<Integer> yourQuery = criteriaBuilder.createQuery(Integer.class); | |
| Root<YourRootClass> rootClass = yourQuery.from(YourRootClass.class); | |
| Join<YourRootClass, YourManyAttributeClass> theAttribute = rootClass.join("theAttributes"); | |
| Expression<Integer> attributeFieldToCheck = theAttribute.get("attributeFieldToCheck"); | |
| yourQuery.select(criteriaBuilder.max(attributeFieldToCheck)); | |
| Integer maxValue = 0; | |
| try { | |
| maxValue = getEntityManager().createQuery(yourQuery).getSingleResult(); |
This file contains hidden or 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
| $currencySymbol = Mage::app()->getLocale()->currency(Mage::app()->getStore()-> | |
| getCurrentCurrencyCode())->getSymbol(); |
This file contains hidden or 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
| for i in {1..5000}; do echo 'Doing something 5000 times'; done |
This file contains hidden or 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
| perl -pi -e "s:toSearch:toReplaceWith:g" path/to/file(s) |