This file contains 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
select | |
sess.login_name as [Login Name], | |
sess.host_name as [Client Machine], | |
db.name as [Database], | |
sess.program_name as [Client Program], | |
COUNT(*) as [Open Connections], | |
AVG(DATEDIFF(MILLISECOND, conn.connect_time, sssn.login_time)) AS [MillisecondsBetweenConnectionAndSessionStart] | |
from sys.dm_exec_sessions sess (nolock) | |
left join sys.dm_exec_requests r (nolock) | |
on r.session_id = sess.session_id |
This file contains 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 node | |
// detect errors and potential problems in your JavaScript code. | |
// v1.0 | |
// foldersToProcess = array of folders with the js files to js-lint. | |
var fs = require('fs'); | |
var path = require('path'); | |
var jshint = require('jshint').JSHINT; | |
var async = require('async'); |
This file contains 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 node | |
// useref index.html | |
// v1.0 | |
// searches the node-useref tags in your index.html to replace it width | |
// the bundle. | |
// https://www.npmjs.com/package/node-useref | |
var fs = require('fs'); | |
var path = require('path'); |
This file contains 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 node | |
// uglify the js and css file. | |
// v1.0 | |
// foldersToProcess: array of folders where the js and css file are. | |
var fs = require('fs'); | |
var path = require('path'); | |
var UglifyJS = require('uglify-js'); | |
var CleanCSS = require('clean-css'); |
This file contains 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 node | |
// Remove unused folder which are not needed by our app. | |
// v1.0 | |
// Since the lib folder will be deleted we need to move the fonts | |
// referenced in the css to the root. | |
// foldersToRemove = array of folders to remove. | |
var fs = require('fs'); | |
var path = require('path'); |
This file contains 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 node | |
// Parses the index.html file search for js and css files. | |
// v1.0 | |
// all the files will be concatenated in 2 files. | |
// Note: It does not touch cordova.js. | |
// appConcatFolder: folder for the js bundle. | |
// appConcatFile: name of the js file bundle. | |
// cssConcatFolder = folder of the css bundle; | |
// cssConcatFile = name of the css file bundle; |
This file contains 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 node | |
// Move fonts in lib/ionic/fonts to the root in fonts folder | |
// v1.0 | |
// Since the lib folder will be deleted we need to move the fonts | |
// referenced in the css to the root. | |
// foldersWithFontsToMove = array of folders containing fonts files you want to move in the root. | |
var fs = require('fs'); | |
var path = require('path'); |
This file contains 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
(function() { | |
'use strict'; | |
angular | |
.module('starter') | |
.controller('home', homeController); | |
homeController.$inject = ['$scope', '$q', '$http', '$filter']; | |
/* @ngInject */ |
This file contains 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 Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |