- Go to menu Help > Enter License.
- Copy the license key below and paste it into the textbox > Click the Use License button.
- Enjoy! 👍
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
| <?php | |
| //Get data from instagram api | |
| $hashtag = 'max'; | |
| //Query need client_id or access_token | |
| $query = array( | |
| 'client_id' => '', | |
| 'count' => 3 | |
| ); | |
| $url = 'https://api.instagram.com/v1/tags/'.$hashtag.'/media/recent?'.http_build_query($query); |
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
| <?php | |
| /** | |
| * This script is for easily deploying updates to Github repos to your local server. It will automatically git clone or | |
| * git pull in your repo directory every time an update is pushed to your $BRANCH (configured below). | |
| * | |
| * Read more about how to use this script at http://behindcompanies.com/2014/01/a-simple-script-for-deploying-code-with-githubs-webhooks/ | |
| * | |
| * INSTRUCTIONS: | |
| * 1. Edit the variables below | |
| * 2. Upload this script to your server somewhere it can be publicly accessed |
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 | |
| # Source | |
| # https://gist.github.com/oodavid/54cadfb92ff49618797d | |
| # Adapted from | |
| # https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-14-04 | |
| # Make sure this is added to the crontab, ie: | |
| # sudo crontab -e | |
| # 30 2 * * 1 /home/ubuntu/khan-draw/ssl-letsencrypt-auto-renew.sh >> /var/log/ssl-letsencrypt-auto-renew.log | |
| # Config |
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
| # Search common.php for changes in the VERSION | |
| # Note - won't follow line changes, it always looks at line 11... | |
| git log --all --format=format:%H -G'\$VERSION' common.php | xargs -L 1 git blame common.php -L 11,11 > ~/versions.txt |
This gist assumes:
- you have a local git repo
- with an online remote repository (github / bitbucket etc)
- and a cloud server (Rackspace cloud / Amazon EC2 etc)
- your (PHP) scripts are served from /var/www/html/
- your webpages are executed by apache
- apache's home directory is /var/www/
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
Show hidden characters
| { | |
| "cmd": ["mysql -u USERNAME -pPASSWORD DATABASE -t < $file >> /tmp/output.sql ; subl3 /tmp/output.sql"], | |
| "selector": "source.sql", | |
| "shell" : true | |
| } |
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
| #301 Redirects for .htaccess | |
| #Redirect a single page: | |
| Redirect 301 /pagename.php http://www.domain.com/pagename.html | |
| #Redirect an entire site: | |
| Redirect 301 / http://www.domain.com/ | |
| #Redirect an entire site to a sub folder | |
| Redirect 301 / http://www.domain.com/subfolder/ |
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
| ====== | |
| Videos | |
| ====== | |
| DevOps | |
| What is DevOps? by Rackspace - Really great introduction to DevOps | |
| https://www.youtube.com/watch?v=_I94-tJlovg | |
| Sanjeev Sharma series on DevOps (great repetition to really get the DevOps concept) |
This is a simple way to backup your MySQL tables to Amazon S3 for a nightly backup - this is all to be done on your server :-)
Sister Document - Restore MySQL from Amazon S3 - read that next
this is for Centos 5.6, see http://s3tools.org/repositories for other systems like ubuntu etc