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 Keyboard-Saver { | |
$wshell = New-Object -ComObject wscript.shell; | |
While ($True) { | |
$wshell.SendKeys("{F15}") | |
Start-Sleep 240 | |
} | |
} |
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
# alpine 3.11 | |
FROM node:12-alpine as base | |
# set working directory | |
WORKDIR /app | |
ENV CHROME_BIN /usr/bin/chromium-browser | |
# Please stop doing things like making us copy things out of separate folders while | |
# also including a private nuget feed. I'm sure there's a good reason for it, but it is |
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
var _ = require('lodash'); | |
var snippets = require('apostrophe-snippets'); | |
module.exports = mainnav; | |
function mainnav(options, callback) { | |
return new mainnav.Mainnav(options, callback); | |
} | |
mainnav.Mainnav = function (options, callback) { | |
var self = this; | |
var apos = options.apos; | |
var app = options.app; |
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
var superGet = self.get; | |
self.get = function (req, userCriteria, optionsArg, callback) { | |
var options = {}; | |
var filterCriteria = {}; | |
// "Why copy the object like this?" If we don't, we're modifying the | |
// object that was passed to us, which could lead to side effects | |
_.merge(options, optionsArg || {}); | |
_.merge(filterCriteria, userCriteria || {}); | |
// need a sort helper key on these fields to normalize the first and last names | |
// and handle upper/lower case letters. Adding this helper key normalizes the data. |
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
# Basic setup | |
Update-ExecutionPolicy Unrestricted | |
Set-ExplorerOptions -showHidenFilesFoldersDrives -showProtectedOSFiles -showFileExtensions | |
Enable-RemoteDesktop | |
Disable-InternetExplorerESC | |
Disable-UAC | |
Set-TaskbarSmall | |
if (Test-PendingReboot) { Invoke-Reboot } |
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
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.require_version ">= 1.6.3" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.define "boot2docker" | |
config.vm.box = "yungsang/boot2docker" | |
config.vm.synced_folder ".", "/vagrant" |
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
public class MediaRequestOverride : MediaProvider | |
{ | |
public override Media GetMedia(MediaUri mediaUri) | |
{ | |
var mediaData = GetMediaData(mediaUri); | |
var media = GetMedia(mediaData); | |
return GetMediaFace(media); | |
} |
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
protected void Application_Error(object sender, EventArgs e) | |
{ | |
var exception = Server.GetLastError(); | |
Server.ClearError(); | |
var routeData = new RouteData(); | |
routeData.Values.Add("controller", "Error"); | |
routeData.Values.Add("action", "Index"); | |
Sitecore.Diagnostics.Log.Error("Application_Error invoked", exception, this); |
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
public class StubItem : Item | |
{ | |
public StubItem([NotNull] ID itemID, [NotNull] ItemData data, [NotNull] Database database) | |
: base(itemID, data, database) | |
{ | |
} | |
private Language originalLanguage; | |
public Language OriginalLanguage |
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
<configuration xmlns:x="http://www.sitecore.net/xmlconfig/"> | |
<sitecore> | |
<databases> | |
<database id="web" singleInstance="true" type="Sitecore.Data.Database, Sitecore.Kernel"> | |
<Engines.HistoryEngine.Storage> | |
<obj type="Sitecore.Data.$(database).$(database)HistoryStorage, Sitecore.Kernel"> | |
<param connectionStringName="$(id)" /> | |
<EntryLifeTime>30.00:00:00</EntryLifeTime> | |
</obj> | |
</Engines.HistoryEngine.Storage> |
NewerOlder