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
define(['durandal/system', './transitionHelper'], function(system, helper) { | |
var settings = { | |
inAnimation: 'fadeInLeftBig', | |
outAnimation: 'fadeOutRight' | |
}, | |
fadeIn = function(context) { | |
system.extend(context, settings); | |
return helper.create(context); | |
}; |
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
#!/bin/bash | |
# Install nodejs. | |
# | |
# Usage: sudo ./node-install.sh | |
# | |
# By Jim Stott | |
# | |
# Tested on Ubuntu 13.04 | |
# Created at: 2013-09-09 |
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
#!/bin/bash | |
# Install redis and run via upstart on Ubuntu. | |
# | |
# Get Script: | |
# wget -O redis-install-full.sh https://gist.github.com/jstott/6552270/raw | |
# chmod +x redis-install-full.sh | |
# | |
# Usage: sudo ./redis-install-full.sh | |
# |
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
// fragment from main.js | |
// specify which plugins to install and their configuration v2.0 | |
// assumes raygun4js is loaded | |
app.configurePlugins({ | |
router: true, | |
rayGun: { | |
enable: true, // !system.debug, | |
errorOption: { systemError: true, suppress: true }, | |
apiKey: 'your-apikey-here', | |
version: 'x.y.z', |
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
/** | |
* Integrates Google Analytics within Durandal, optionally (re)mapping system.error. | |
* @module analytics | |
* @requires system | |
* @example | |
// sample configuration from main.js | |
app.configurePlugins({ | |
... other plugins ... | |
analytics: { | |
enable: true, // !system.isDebugging, |
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
#!/bin/bash | |
# Install phantomjs. | |
# | |
# Get file: | |
# wget https://gist.github.com/jstott/7903681/raw/fe0c616957d63f61fc06e45d5cacc66880cf4190/phantomjs-install.sh | |
# Change Permissions to execute | |
# chmod +x phantomjs-install.sh | |
# Usage: sudo ./phantomjs-install.sh | |
# |
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
REM on one line | |
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex | |
((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" | |
&& SET PATH=%PATH%;%systemdrive%\chocolatey\bin | |
REM Apps | |
cinst GoogleChrome | |
cinst Firefox | |
cinst imgburn |
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
Set-ExplorerOptions -showHidenFilesFoldersDrives -showProtectedOSFiles -showFileExtensions | |
cinst notepadplusplus | |
cinst googlechrome | |
cinst dotnet4.5.2 | |
cinst octopusdeploy.tentacle | |
cinst git.install | |
cinst 7zip.install | |
cinst 7zip.commandline |
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 getPaginatedItems(items, page, pageSize) { | |
var pg = page || 1, | |
pgSize = pageSize || 100, | |
offset = (pg - 1) * pgSize, | |
pagedItems = _.drop(items, offset).slice(0, pgSize); | |
return { | |
page: pg, | |
pageSize: pgSize, | |
total: items.length, | |
total_pages: Math.ceil(items.length / pgSize), |
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
DECLARE @DatabaseID int | |
SET @DatabaseID = DB_ID() | |
SELECT DB_NAME(@DatabaseID) AS DatabaseName, | |
schemas.[name] AS SchemaName, | |
objects.[name] AS ObjectName, | |
indexes.[name] AS IndexName, | |
objects.type_desc AS ObjectType, | |
indexes.type_desc AS IndexType, |
OlderNewer