Skip to content

Instantly share code, notes, and snippets.

View bardware's full-sized avatar

Bernhard Döbler bardware

View GitHub Profile
@bardware
bardware / 20180312_box_error.txt
Created March 12, 2019 17:51
Error trying to set a mailserver
> cfconfig set mailServers=127.0.0.1 to=myserver
ERROR (4.6.0+00003)
invalid call of the function setMailServers, first Argument (mailServers) is of invalid type, can't cast String [127.0.0.1] to a value of type [array]
the function is located at [C:\Users\xxx\.CommandBox\cfml\modules\commandbox-cfconfig\modules\cfconfig-services\models\providers\Adobe9.cfc]
\modules\commandbox-cfconfig\commands\cfconfig\set.cfc: line 59
57: error( "[#property#] is not a valid property" );
58: }
59: oConfig[ 'set#property#' ]( arguments[ property ] )
60: .write( toDetails.path );
@bardware
bardware / server.out.txt
Created March 1, 2019 22:17
Errors when trying to use CF 9 under Commandbox 4.5
[INFO ] runwar.server: Starting RunWAR 3.8.1-SNAPSHOT
[INFO ] runwar.server: Starting background cf9001 [adobe 9.0.2+282541] from: /C:/Users/bd/.CommandBox/lib/runwar-3.8.1-SNAPSHOT.jar
[INFO ] runwar.context: Starting in background -
[INFO ] runwar.server: Starting RunWAR 3.8.1-SNAPSHOT
[INFO ] runwar.server: Adding additional lib dir of: C:\Users\bd\.CommandBox\server\FA53F12C9565C5F09E80F00AED307624-cf9001\adobe-9.0.2.282541\WEB-INF/lib
[INFO ] runwar.server: ******************************************************************************
[INFO ] runwar.server: Starting - port:53699 stop-port:53700 warpath:file:/D:/Webs/CF9.001/
[INFO ] runwar.server: context: / - version: 3.8.1-SNAPSHOT
[INFO ] runwar.server: web-dirs: D:\Webs\CF9.001
[INFO ] runwar.server: Log Directory: C:\Users\bd\.CommandBox\server\FA53F12C9565C5F09E80F00AED307624-cf9001\adobe-9.0.2.282541\logs
@bardware
bardware / clear_pac.sh
Created March 1, 2019 16:43
Clear pacman cache
You can also define how many recent versions you want to keep. To retain only one past version use:
# paccache -rk1
Add the u switch to limit the action of paccache to uninstalled packages. For example to remove all cached versions of uninstalled packages, use the following:
# paccache -ruk0
@bardware
bardware / tz.001.cfm
Created August 22, 2018 17:44
Timezone list
<cfset oZoneId = createObject( "java", "java.time.ZoneId")>
<cfset oInstant = createObject( "java", "java.time.Instant")>
<cfset oTextStyle = createObject( "java", "java.time.format.TextStyle")>
<cfset oLocale = createObject( "java", "java.util.Locale").init( getLocale() )>
<cfset qryTZ = queryNew(
"offset,zone,region,displayfull,displayfullstdo,displaynarrow,displaynarrowstdo,displayshort,displayshortstdo,displayfulloffset,displayshortoffset",
"Integer,VarChar,VarChar,VarChar,VarChar,VarChar,VarChar,VarChar,VarChar,VarChar,VarChar"
)>
<!---
http://teratech.com/is-lucee-cfml-now-better-than-adobe-coldfusion/
--->
<cfscript>
data={
boolean:true,
stringTrue:'true',
stringYes:'yes',
number:5,
stringFive:'5'
@bardware
bardware / EncodeRFC3986.cfm
Last active July 20, 2018 15:41 — forked from Leigh-/EncodeRFC3986.cfm
Comparison of EncodeForURL, URLEncodedFormat and EncodeRFC3986 (UDF)
<cfscript>
/**
* URI encoding per RFC 3986, which has treats the following as unreserved: ALPHA / DIGIT / "-" / "." / "_" / "~"
* @text Text to encode
* @returns URI encoded text
*/
public function encodeRFC3986(required string text) {
// Requires CF10+
Local.encoded = encodeForURL(arguments.text);
// Reverse encoding of tilde "~"
@bardware
bardware / mailSpoolService.cfm
Created July 10, 2018 13:42
restartColdFusion Mail-Spooler
<!---
https://plus.google.com/+JustinCookie/posts/CSj9HVoRTcY
--->
<cfscript>
sFactory = CreateObject("java", "coldfusion.server.ServiceFactory");
sFactory.mailSpoolService.stop()';
sFactory.mailSpoolService.start();
</cfscript>
@bardware
bardware / leeg.cfm
Last active May 9, 2018 22:42
look at this code on http://cflive.net/
<!---
http://cflive.net/
https://trycf.com/scratch-pad/gist/b53c961633fabec3634b7a68a88b700c
--->
<cfscript>
stAnswer = {
givenAnswer = "no"
};
writeOutput(stAnswer.givenAnswer ?: "leeg");
@bardware
bardware / DVBT.Nuernberg.xspf
Last active April 4, 2019 21:57
DVB-T2 - Free TV-Sender für VLC
<?xml version="1.0" encoding="UTF-8"?>
<playlist xmlns="http://xspf.org/ns/0/" xmlns:vlc="http://www.videolan.org/vlc/playlist/ns/0/" version="1">
<title>Wiedergabeliste</title>
<trackList>
<track>
<location>dvb-t://frequency=506000:bandwidth=8</location>
<title>1-2-3.tv HD</title>
<extension application="http://www.videolan.org/vlc/playlist/0">
<vlc:id>18</vlc:id>
<vlc:option>dvb-adapter=0</vlc:option>