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
| Sync a folder on server with bucket | |
| s3cmd sync /this/www/ s3://to/this/bucket/ | |
| Copy one bucket to another | |
| s3cmd sync s3://from/this/bucket/ s3://to/this/bucket/ | |
| http://s3tools.org/download | |
| http://tecadmin.net/install-s3cmd-manage-amazon-s3-buckets/ | |
| http://tecadmin.net/s3cmd-file-sync-with-s3bucket/ |
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
| #!/bin/sh | |
| declare -a iPath=('/var/www/vhosts/public_html/images/misc'); | |
| lof_file=('/var/www/vhosts/image_opt.log') | |
| start_time=$(date +%s) | |
| if [ -f $lof_file ]; | |
| then | |
| dt_mod=("-newer $lof_file") | |
| else |
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
| Disable the Dock’s ‘bounce to alert’ behavior | |
| defaults write com.apple.dock no-bouncing -bool TRUE | |
| killall Dock |
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
| How tasks works | |
| http://craftcms.stackexchange.com/questions/14530/tasks-and-steps |
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
| {# craft.entries tag #} | |
| {% set entries = craft.entries.first() %} | |
| {% set entries = craft.entries.last() %} | |
| {% set entries = craft.entries.find() %} | |
| {% set entries = craft.entries.ids() %} | |
| {% set entries = craft.entries.total() %} | |
| {% set entries = craft.entries({ | |
| id: id OR 'not id' OR '1,2,3' OR [1,2,3], | |
| fixedOrder: true OR false, |
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
| Serve robots.txt inline in Nginx | |
| 06/18/2015 nginx 3 Comments | |
| To quickly serve a robots.txt from Nginx without actually having access to the physical file you can define the content of the robots.txt file in the Nginx .conf file. | |
| Allow access to all User-agents: | |
| location /robots.txt {return 200 "User-agent: *\nDisallow:\n";} | |
| Disallow access to every User-agent: |
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
| Adyen Test Card Numbers | |
| These cards are only valid on our TEST system and they will never involve any actual transaction or transfer of funds. The TEST card numbers will not work on the Adyen LIVE Platform. | |
| For all cards use the following expiration and CVV2/CVC2/or CID for Amex. | |
| For all cards: | |
| Expiration Dates CVV2 / CVC3 CID (American Express) | |
| 06/2016 OR 08/2018 737 7373 |
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
| cd /etc/ssl/certs | |
| openssl dhparam -out dhparam.pem 4096 | |
| Cookies | |
| All cookies should be created such that their access is as limited as possible. This can help minimize damage from cross-site scripting (XSS) vulnerabilities, as these cookies often contain session identifiers or other sensitive information. | |
| Directives | |
| Secure: All cookies must be set with the Secure flag, indicating that they should only be sent over HTTPS | |
| HttpOnly: Cookies that don't require access from JavaScript should be set with the HttpOnly flag | |
| Expiration: Cookies should expire as soon as is necessary: session identifiers in particular should expire quickly |
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
| #!/bin/bash | |
| # Set the ROOM_ID & AUTH_TOKEN variables below. | |
| # Further instructions at https://www.hipchat.com/docs/apiv2/auth | |
| ROOM_ID=XXX | |
| AUTH_TOKEN=XXX | |
| MESSAGE="Hello world!" | |
| curl -H "Content-Type: application/json" \ |
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
| curl -w "@curl-format.txt" -o /dev/null -s http://wordpress.com/ | |
| n | |
| time_namelookup: %{time_namelookup}n | |
| time_connect: %{time_connect}n | |
| time_appconnect: %{time_appconnect}n | |
| time_pretransfer: %{time_pretransfer}n | |
| time_redirect: %{time_redirect}n | |
| time_starttransfer: %{time_starttransfer}n | |
| ----------n |