- Open Automator
- Choose Quick Action as the document type
- Change Workflow receives current to files or folders in Finder.app
- For Action, choose Open Finder items from the left hand sidebar
- Change Open with to Visual Studio Code.app (find it in Other... )
- For the Icon, change Image to "Choose..." and select the Visual Stuido Code app. It'll automatically pick the icon
- Save it (Cmd+S) as something like "Open in VS Code"
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 | |
| # Author: Aamnah | |
| # Link: https://aamnah.com | |
| # get and restore all databased from another server on this server | |
| REMOTE_SSH_HOST='123.123.123.123' # Server IP or FQDN of the remote server you're importing from | |
| REMOTE_SSH_USER='root' | |
| REMOTE_SSH_KEY="~/.ssh/id_rsa" |
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 | |
| # Purpose: Transfer /var/www files from another server | |
| # This PULLS the changes, i.e. it'll fetch stuff from another server | |
| # and write on the one you're running the command from | |
| # Pull: sync remote with local | |
| # Include a config.sh file that has variables | |
| # scriptPath="${BASH_SOURCE%/*}" | |
| # source "${scriptPath}/config.sh" |
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
| @font-face { | |
| font-family: 'MyWebFont'; | |
| src: url('webfont.eot'); /* IE9 Compat Modes */ | |
| src: url('webfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ | |
| url('webfont.woff2') format('woff2'), /* Super Modern Browsers */ | |
| url('webfont.woff') format('woff'), /* Pretty Modern Browsers */ | |
| url('webfont.ttf') format('truetype'), /* Safari, Android, iOS */ | |
| /* url("webfont.otf") format("opentype") */ | |
| url('webfont.svg#svgFontName') format('svg'); /* Legacy iOS */ | |
| } |
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
| # UNINSTALL | |
| # See what versions are installed with `brew list | grep php` | |
| brew remove --force --ignore-dependencies httpd | |
| brew remove --force --ignore-dependencies php70-xdebug php71-xdebug | |
| brew remove --force --ignore-dependencies php70-imagick php71-imagick | |
| brew remove --force --ignore-dependencies mcrypt php70-mcrypt | |
| brew remove --ignore-dependencies --force php70 php71 php72 | |
| # RE-INSTALL |
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
| -- Get all products that have: | |
| -- weight <= 0 | |
| -- quantity >= 1 | |
| SELECT | |
| oc_product.product_id, | |
| REPLACE(oc_product_description.name, '"', '"') AS 'Title', | |
| oc_product.model AS 'Model', | |
| oc_product.weight AS 'Weight', |
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
| /* | |
| Handle | |
| Title = oc_product_description.name | |
| Body (HTML) = oc_product_description.description | |
| Vendor = oc_product.manufacturer_id | |
| Type | |
| Tags = oc_product_description.tag | |
| Published = oc_product.status | |
| Option1 Name | |
| Option1 Value |
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
| -- Create a Database | |
| CREATE DATABASE IF NOT EXISTS mydatabase; | |
| -- Switch to using that database | |
| -- (so that all tables are created in this and not the master db) | |
| USE mydatabase; | |
| -- Create a Table | |
| CREATE TABLE IF NOT EXISTS mytable | |
| ( |
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
| -- Run this command on the OpenCart database to get Customers in the required Shopify format | |
| SELECT | |
| oc_customer.firstname AS 'First Name', | |
| oc_customer.lastname AS 'Last Name', | |
| oc_customer.email AS 'Email', | |
| oc_address.company AS 'Company', | |
| oc_address.address_1 AS 'Address1', | |
| oc_address.address_2 AS 'Address2', | |
| oc_address.city AS 'City', |
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
| # Enable Gzip compression for your site | |
| # This goes in the .htaccess file for your site | |
| # Or the server wide httpd.conf if you want to enable it for all sites | |
| # https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-mod_deflate-on-ubuntu-14-04 | |
| <IfModule mod_deflate.c> | |
| <IfModule mod_filter.c> | |
| # Compress HTML, CSS, JavaScript, Text, XML and fonts | |
| AddOutputFilterByType DEFLATE application/javascript |