Commands can be shorter when you have only one remote Git server.
git fetch
git checkout name-of-the-remote-branch
Example output:
| using System.Xml.Linq; | |
| namespace Playground | |
| { | |
| public class FetchUtil | |
| { | |
| private static readonly Type[] SimpleTypes = new Type[] { typeof(string), typeof(DateTime), typeof(Enum), typeof(decimal), typeof(Guid) }; | |
| public static XElement ToXml(string rootName, object? x, XElement? root = null) | |
| { | |
| if (x == null) { return new XElement(rootName); } |
| /* This function uses Navigation API to display a centered dialog. */ | |
| /* Simple parameters are used instead of object to make the function compatible with command bar parameters. */ | |
| function displayDialog(rowId, tableName, pageName, title, contentWidth, contentHeight, primaryControl) { | |
| const parseSize = (str, defaultStr) => (str || defaultStr || "500px").match(/([\d\.]*)(.*)/).splice(1,2); | |
| let [w, wUnit] = parseSize(contentWidth); | |
| let [h, hUnit] = parseSize(contentHeight); | |
| var pageInput = { | |
| pageType: "custom", | |
| name: pageName, | |
| entityName: tableName, |
| module SampleModule { | |
| export class SampleComponent { | |
| isValid: KnockoutComputed<boolean>; | |
| //... | |
| constructor(public element) { | |
| //... | |
| this.isValidConnectAs = ko.computed<boolean>({ | |
| owner: this, | |
| read: () => { |
| Function Deploy-AzureFunction( | |
| [Parameter(Mandatory = $true)] | |
| [String]$username, | |
| [Parameter(Mandatory = $true)] | |
| [String]$password, | |
| [Parameter(Mandatory = $true)] | |
| [String]$functionAppName, | |
| [Parameter(Mandatory = $true)] | |
| [String]$zipFilePath | |
| ) |
| #Which process was taking up a lot of processing resource over the last two hours in a specific machine? | |
| #(don't be surprised if it is more that 100% because it can be a multi-core machine) | |
| let startTime=ago(2hour) | |
| let ednTime=now() | |
| Perf | |
| | where TimeGenerated between (startTime..endTime) and Computer == "(Contoso.Retail.com)" and ObjectName == "Process" and InstanceName !in ("_Total", "idle") | |
| | make-series avg(CounterValue) default=0 on TimeGenerated in range(startTime, endTime, 10m) by InstanceName | |
| | mvexpand TimeGenerated to typeof(datetime), avg_CounterValue to typeof(double) limit 100000 | |
| | render timechart |
| public class Text | |
| { | |
| [MethodImpl(MethodImplOptions.AggressiveInlining)] | |
| private static bool IsWhiteSpace(char ch) | |
| { | |
| // this is surprisingly faster than the equivalent if statement | |
| switch (ch) | |
| { | |
| case '\u0009': | |
| case '\u000A': |
| public class StringCompressor { | |
| readonly string _value; | |
| public void StringCompressor(string value) | |
| { | |
| _value = value; | |
| } | |
| public MemoryStream ToCompressedStream1(CompressionLevel level) | |
| { |