Skip to content

Instantly share code, notes, and snippets.

@jpmitche11
jpmitche11 / xmlSig.cs
Created November 13, 2016 22:01
c# XML Signature Validation. Adopted from msdn example code on: https://msdn.microsoft.com/en-us/library/ms229950(v=vs.110).aspx
using System;
using System.Security.Cryptography;
using System.Security.Cryptography.Xml;
using System.Xml;
public class VerifyXML
{
public static void Main(String[] args)
{
Unhandled issue: UnhandledExceptionInHandler
[detail] HandlerType = VBrickPlatform.Domains.Runtime.Work.HandlerFactory+WorkItemHandler
[detail] Message =
ROOT CAUSE: VBrickPlatform.IssueException
Unhandled issue: UnknownMessageType
(function(){
'use strict';
var util = angular.module("util", []);
/**
Conditional filter. If the conditionExpr parameter evaluates to true, the filter returns the original expression's value
If the condition is false, then returns null
Example:
{{ expression |vbIf:conditionExpr}}
<input class="{{'invalid'|vbIf:!isValid}}" ng-model="field"/>
@jpmitche11
jpmitche11 / log4j.properties
Created September 2, 2012 04:10
Sample log4j properties file
#Put this file on your classpath root.
log4j.rootLogger=DEBUG, console
# Direct log messages to stdout
log4j.appender.console=org.apache.log4j.ConsoleAppender
log4j.appender.console.Target=System.out
log4j.appender.console.layout=org.apache.log4j.PatternLayout
log4j.appender.console.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
@jpmitche11
jpmitche11 / gist:3594699
Created September 2, 2012 03:54
page scraper
package jpm;
import java.util.List;
import org.jsoup.Jsoup;
import org.jsoup.helper.HttpConnection;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.DocumentType;
import org.jsoup.nodes.Node;
@jpmitche11
jpmitche11 / gist:3506105
Created August 29, 2012 02:10
Add jquery to page
javascript: (function () {
var callback = function(){
};
if (window.jQuery){
callback();
}
else{
script = document.createElement("script");
script.type = "text/javascript";