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
| @ECHO OFF | |
| ::Change WebStormPath to whatever suits your system then right-click and 'run as administrator'. | |
| SET WebStormPath=C:\Program Files (x86)\JetBrains\WebStorm 8.0.2\bin\WebStorm64.exe | |
| ECHO Adding file entries | |
| @reg add "HKEY_CLASSES_ROOT\*\shell\Open in WebStorm" /t REG_SZ /v "" /d "Open in WebStorm" /f | |
| @reg add "HKEY_CLASSES_ROOT\*\shell\Open in WebStorm" /t REG_EXPAND_SZ /v "Icon" /d "%WebStormPath%,0" /f |
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
| var _ = require('lodash'); | |
| var j2csv = require('json2csv'); | |
| var cp = require("child_process"); | |
| var fs = require('fs'); | |
| /* Consts: */ | |
| var showErrors = false; // Show errors in console flag | |
| var listCmd = 'npm list --long --json'; // npm list command | |
| var maxBuffer = 1024 * 1000 * 10; // 10 MB. // cp maxBuffer | |
| var cwd = require('path').dirname(require.main.filename); // Current working directory |
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
| DELETE `t1` | |
| FROM `table` `t1` | |
| INNER JOIN `table` `t2` | |
| ON `t1`.`dup_col1` = `t2`.`dup_col1` | |
| AND `t1`.`dup_col2` = `t2`.`dup_col2` | |
| # AND... | |
| WHERE `t1`.`primary_key` > `t2`.`primary_key` | |
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
| SET BackupDate=%date:~4% | |
| DATE 28/02/2000 | |
| timeout 1 | |
| START "" "C:\Program Files\app\app.exe" | |
| timeout 2 | |
| DATE %BackupDate% |
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
| =SUBSTITUTE(ADDRESS(1,COLUMN(),4),"1","") & ROW() // Current cell path (i.e. A5) | |
| =INDIRECT(SUBSTITUTE(ADDRESS(1,COLUMN(),4),"1","") & ROW()) // Current cell content. |
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
| // For some reason space is required after %c. Second parameter is any css. | |
| console.log("%c This will be formatted", "color: #FAC66E; background-color: #2B2B2B; font-size: medium"); | |
| console.log(`%c This will be ${}`, "color: #FAC66E; background-color: #2B2B2B; font-size: medium"); |
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
| // Use Angular service in console: | |
| // clientDetails service (get method): | |
| angular.element(document.body).injector().get('clientDetails').get(); | |
| // configAPI service (set method): | |
| angular.element(document.body).injector().get('configAPI').set(); | |
| // Also works with var: | |
| var configAPIService = angular.element(document.body).injector().get('configAPI'); | |
| configAPIService.set(); | |
| // View $rootScope in console: |
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
| // Comfotability util for easy caching using Apps Script DocumentCache. | |
| // Uses md5 for cache keys. | |
| // See: https://developers.google.com/apps-script/reference/cache/cache | |
| var CACHE_INTERVAL = 21600; | |
| var docCache = CacheService.getDocumentCache(); | |
| function cacheSet(key, val){ | |
| return dcache.put(md5(key), JSON.stringify(val), CACHE_INTERVAL); // Max is: 21600 = 6hours |
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
| # To hide the console, see: | |
| # https://gist.github.com/NitaiPerez/6d665465e0a6e7b63b21ce7e57fbf0cc | |
| # Sideload windows store app using .appxbundle file: | |
| # Enable sideload apps in settings (). | |
| Add-AppxPackage <app name>.appxbundle | |
| #Remove package: | |
| Remove-AppxPackage -package <package name> |
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 dependencies. | |
| */ | |
| var express = require('../../'); | |
| var app = module.exports = express(); | |
| var logger = require('morgan'); | |
| var silent = 'test' == process.env.NODE_ENV; | |
| // general config |