Just a dump of handy live templates I use with IntelliJ. They should also work with WebStorm.
- Go to
settings. - Search for
live templates. - Under the javascript section you should be able to manage your templates.
| #!/bin/sh | |
| mysqldump -u [mysql user] -p[mysql password] --skip-extended-insert [database] > /path/to/your/repo/[database].sql | |
| cd /path/to/your/repo | |
| git add [database].sql |
| #!/bin/sh | |
| git filter-branch --env-filter ' | |
| OLD_EMAIL="your-old-email@example.com" | |
| CORRECT_NAME="Your Correct Name" | |
| CORRECT_EMAIL="your-correct-email@example.com" | |
| if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ] | |
| then |
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <link href="https://cdnjs.cloudflare.com/ajax/libs/foundation/5.5.2/css/foundation.min.css" rel="stylesheet" type="text/css" /> | |
| <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.0/angular.min.js"></script> | |
| <meta charset="UTF-8"> | |
| <title>AngularJS Behaviors</title> | |
| </head> |
| <!doctype html> | |
| <html ng-app="Demo"> | |
| <head> | |
| <meta charset="utf-8" /> | |
| <title> | |
| Understanding How To Use $scope.$watch() With Controller-As In AngularJS | |
| </title> | |
| <link rel="stylesheet" type="text/css" href="./demo.css"></link> |
| $x('//*/table[@id=":1jx"]/tbody/tr/td[@class="yX xY "]') | |
| .forEach( | |
| function(i) { | |
| console.log(i.innerText) | |
| } | |
| ) |
| # run from within directory tha contains CSV files you want to combine | |
| cat *.csv > combined.csv |
| select * | |
| from dm_info d | |
| where d.info_domain = "INS" | |
| and d.info_name = "CONTENT_SERVICE_URL" | |
| with time = 10 |
| ' If you want to be sure that the static content has refreshed properly - take out the "/manager" part of the URL from the content management page, and replace it with:' | |
| /custom_mpage_content/custom-components/js/custom-components.js | |
| ' That should let you download the JS file from the web server, rather than the code warehouse, so you can make sure that it has actually refreshed. | |
| You can also refresh the static content by running the CCL program manually: ' | |
| mp_refresh_static_content "MINE", "custom_mpage_content" |