- Setup
- Swapfile
- NGINX
- ElasticSearch
- RVM
- Rails
- Postgres
- Capistrano
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
| UPDATE wp_options SET option_value = replace(option_value, 'http://www.oldurl', 'http://www.newurl') WHERE option_name = 'home' OR option_name = 'siteurl'; | |
| UPDATE wp_posts SET guid = replace(guid, 'http://www.oldurl', 'http://www.newurl'); | |
| UPDATE wp_posts SET post_content = replace(post_content, 'http://www.oldurl', 'http://www.newurl'); | |
| UPDATE wp_postmeta SET meta_value = replace(meta_value, 'http://www.oldurl', 'http://www.newurl'); |
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 | |
| // Run this file from terminal "php ./import-post-wp.php PATH-TO-JSON" | |
| // Make sure you change permissions on the file so you can run it | |
| echo "\n"; | |
| // use this to stop the script from actually saving anything | |
| $debug = false; | |
| // load WP to get all it's fancy functions |
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
| insertParam: (key, value) -> | |
| key = encodeURI(key) | |
| value = encodeURI(value) | |
| url = document.location.search.substr(1).split('&') | |
| for part, index in url by -1 | |
| param = part.split('=') | |
| if param[0] == key | |
| param[1] = value | |
| url[index] = param.join('=') |
Install software-properties-common
sudo apt-get install software-properties-common
Add Repo
sudo add-apt-repository ppa:olipo186/git-auto-deploy
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
| #!/usr/bin/env ruby | |
| require 'mysql2' | |
| require 'awesome_print' | |
| require 'colorize' | |
| db_name = 'db_name' | |
| db_host = 'localhost' | |
| db_username = 'db_user' | |
| db_password = 'db_pass' |
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
| #!/usr/bin/env ruby | |
| # Use this script to search for a string in all columns and tables in MYSQL | |
| # INSTALLATION | |
| # gem install mysql2 | |
| # gem install awesome_print | |
| # gem install colorize | |
| # USAGE | |
| # ./dbsearch.rb 'find me in db' |
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
| # --------------------------------------------------------------------------- | |
| # | |
| # Description: This file holds all my BASH configurations and aliases | |
| # | |
| # Sections: | |
| # 1. Environment Configuration | |
| # 2. Make Terminal Better (remapping defaults and adding functionality) | |
| # 3. File and Folder Management | |
| # 4. Searching | |
| # 5. Process Management |
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
| #!/usr/bin/env bash | |
| VERSION=2.0.12; | |
| # Download this file, rename it to "rare", and place it in your bin directory (for mac it'll be something like usr/local/bin/rare). | |
| # For OSX you could try this CURL command to install it: | |
| # curl https://gist.githubusercontent.com/yosukehasumi/d0c905da78229122e7c1bb34a0fc92a7/raw/rare.sh > /usr/local/bin/rare; | |
| # sudo chmod 755 /usr/local/bin/rare; | |
| # | |
| # To use this script, cd into your project directory and in command line type: |
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
| module.exports = function(grunt) { | |
| grunt.loadNpmTasks('grunt-deployments'); | |
| grunt.initConfig({ | |
| deployments: { | |
| options: { | |
| backups_dir: './backups' | |
| }, | |
| local: { | |
| "title": "Local", |