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
| // This is a C# port of @karpathy microgpt python script (https://gist.github.com/karpathy/8627fe009c40f57531cb18360106ce95) | |
| // It's the closest I could get using C#. | |
| // Use with caution as it could be wrong, but it does seem to get similar outputs | |
| namespace MicroGpt; | |
| public class Value(double data, Value[]? children = null) | |
| { | |
| private readonly Value[] _children = children ?? []; | |
| private Action _backward = () => { }; |
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
| // -------------------------------------------------------------------------------------------------------------------- | |
| // <summary> | |
| // adds the the default query functionality to also get items under the current item by using './' | |
| // or gets items relative to the root of the current site with 'fromroot: | |
| // </summary> | |
| // -------------------------------------------------------------------------------------------------------------------- | |
| namespace Site.Website.Processors | |
| { | |
| using System.Linq; |
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
| // -------------------------------------------------------------------------------------------------------------------- | |
| // <summary> | |
| // New Relic Http Module. | |
| // Fixes the naming of (web) transactions in the New Relic dashboard. | |
| // And fixes IIS request logging. | |
| // original code taken from https://marketplace.sitecore.net/Modules/N/New_Relic.aspx?sc_lang=en | |
| // but fixed to use the template name to identify items due to the new relic transaction limit being | |
| // hit when using this with urls as the transaction name in large solutions | |
| // </summary> | |
| // -------------------------------------------------------------------------------------------------------------------- |
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
| ## Intro: Simple powershell script to install MongoDb as a service | |
| ## Note : These scripts require local admin priviliges! | |
| $serviceName = "MongoDbTestService" #this is the name that windows uses to reference the service | |
| $serviceDisplayName = "MongoDb - Test Service" | |
| $port = "27017" | |
| $projectName = "TestService" | |
| $mongoDataDirectory = "C:\MongoDbData" | |
| $mongodPath = "C:\MongoDB\bin" | |
| $useAuth = $false |