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
try | |
{ | |
throw new Exception(); | |
} | |
catch (Exception ex) | |
{ | |
// Get stack trace for the exception with source file information | |
var st = new StackTrace(ex, true); | |
// Get the top stack frame | |
var frame = st.GetFrame(0); |
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
# On host macOS open up terminal and run: | |
``` | |
cd /Applications/Parallels\ Desktop.app/Contents/Resources/Tools | |
python -m http.server | |
``` | |
# On the VM open a terminal and run the following: | |
``` | |
curl http://10.211.55.2:8000/prl-tools-lin-arm.iso -o /tmp/prl-tools.iso |
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 ExpressionBuilder | |
{ | |
// Define some of our default filtering options | |
private static MethodInfo containsMethod = typeof(string).GetMethod("Contains", new[] { typeof(string) }); | |
private static MethodInfo startsWithMethod = typeof(string).GetMethod("StartsWith", new[] { typeof(string) }); | |
private static MethodInfo endsWithMethod = typeof(string).GetMethod("EndsWith", new[] { typeof(string) }); | |
public static Expression<Func<T, bool>> GetExpression<T>(List<GridHelper.Filter> filters) | |
{ | |
// No filters passed in #KickIT |
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
C:\Program Files\7-Zip>7z.exe a -tzip utility.zip C:\nChannel_2014\nChannel\Dev\ | |
nodejs\management -xr!node_modules |
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 static void SetKey<T>(T obj, TempDataDictionary _tempData) | |
{ | |
System.Type type = typeof(T); | |
// Get our Foreign Key that we want to maintain | |
String foreignKey = _tempData["ForeignKey"].ToString(); | |
// If we do not have a Foreign Key, we do not need to set a property | |
if (String.IsNullOrEmpty(foreignKey)) | |
return; |
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
kubectl -l{LABEL_SELECTOR} --no-headers -o custom-columns=":metadata.name" | xargs -I% kubectl exec % -- curl -X POST http://localhost:{ENVOY_ADMIN_PORT}/logging\?level\=debug |
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
# List clusters | |
aws eks list-clusters | |
# You may need to target different profiles | |
AWS_PROFILE={account-profile-name-here} aws eks list-clusters | |
# Update kubeconfig with cluster info | |
aws eks update-kubeconfig --name {cluster-name-here} | |
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
# git fetch {remote} pull/{PR#}/head && git checkout FETCH_HEAD | |
git fetch upstream pull/855/head && git checkout FETCH_HEAD |
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
<xsl:variable name="Qty"> | |
<xsl:choose> | |
<xsl:when test="Item_Item/Item_Locations/Item_Location[LocationID = $LocationID and ChannelID = $ChannelID]/Quantity = ''"> | |
<xsl:text>0</xsl:text> | |
</xsl:when> | |
<xsl:otherwise> | |
<xsl:value-of select="substring-before(Item_Item/Item_Locations/Item_Location[LocationID = $LocationID and ChannelID = $ChannelID]/Quantity,'.')"/> | |
</xsl:otherwise> | |
</xsl:choose> | |
</xsl:variable> |
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 CSVImportGetHeaders() | |
{ | |
// Get our CSV file from upload | |
var file = document.getElementById('CSVUpload').files[0] | |
// Instantiate a new FileReader | |
var reader = new FileReader(); | |
// Read our file to an ArrayBuffer | |
reader.readAsArrayBuffer(file); |
NewerOlder