Skip to content

Instantly share code, notes, and snippets.

Avatar

Bernhard Döbler bardware

View GitHub Profile
@bardware
bardware / mailSpoolService.cfm
Created Jul 10, 2018
restartColdFusion Mail-Spooler
View mailSpoolService.cfm
<!---
https://plus.google.com/+JustinCookie/posts/CSj9HVoRTcY
--->
<cfscript>
sFactory = CreateObject("java", "coldfusion.server.ServiceFactory");
sFactory.mailSpoolService.stop()';
sFactory.mailSpoolService.start();
</cfscript>
View leeg.cfm
<!---
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 Apr 4, 2019
DVB-T2 - Free TV-Sender für VLC
View DVBT.Nuernberg.xspf
<?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>
View settings.json
{
"telemetry.enableTelemetry": false,
"telemetry.enableCrashReporter": false,
"editor.fontSize": 12,
"editor.fontLigatures": true,
"editor.fontFamily": "Fira Code",
"editor.cursorStyle": "line",
"editor.rulers": [
80,
120
View jsoup001.cfm
<cfset oJSOUP = CreateObject("java", "org.jsoup.Jsoup" )>
<cfset oJSOUPWL = CreateObject("java", "org.jsoup.safety.Whitelist" ).init()>
<cfdump var="#oJSOUP#" expand="false">
<cfdump var="#oJSOUPWL#" expand="false">
<cfdump var="#oJSOUPWL.relaxed()#" expand="false">
<cfdump var="#oJsoup.clean('<a href="link.html"><img src="http://example.com/bild.gif"></a>', oJSOUPWL.relaxed().addAttributes("a", ["href", "class"] ).addAttributes("img", ["src", "class", "styles", "width", "height"] ).removeProtocols("a", "href", ["ftp", "http", "https", "mailto"]).removeProtocols("img", "src", ["http", "https"]) )#">
<cfdump var="#oJsoup.clean('<a href="link.html"><img src="http://example.com/bild.gif"></a>', "http://example.com/", oJSOUPWL.relaxed().preserveRelativeLinks(true))#">
@bardware
bardware / box.log
Created Mar 23, 2018
Commandbox variable [NEWCONTENT] doesn't exist
View box.log
CommandBox:stmelfposy> utils normalize-line-endings *.txt --type windows
Confirm normalizing line endings for 179 files : y
ERROR (3.9.2+00826)
variable [NEWCONTENT] doesn't exist
C:\Users\bddoeble\.CommandBox\cfml\system\modules_app\utils-commands\commands\utils\normalize-line-endings.cfc: line 95
93: }
94:
95: if ( content != newContent ) {
View .eslintrc
{
"extends": ["plugin:prettier/recommended"],
"rules": {
"newline-after-var": "error"
}
}
@bardware
bardware / Application.cfc
Created Dec 11, 2017
Component [site1.Application] has no accessible Member with name [WEBROOT]
View Application.cfc
<cfcomponent>
<cfset this.name = Hash( GetCurrentTemplatePath() )>
<cfset this.webroot = GetDirectoryFromPath(GetCurrentTemplatePath())>
</cfcomponent>
@bardware
bardware / parseDateTime.cfm
Last active Dec 7, 2017
Different output in ACF 11 and 2016
View parseDateTime.cfm
<cfset dNow = Now()>
<cfset dateTimeVar = #dateTimeFormat( dNow, "yyyy.MM.dd HH:nn:ss" )# />
<cfdump var="#dNow#">
<cfdump var="#dateTimeVar#">
<cfoutput>
#parseDateTime( dateTimeVar, "yyyy.MM.dd HH:mm:ss" )#
#parseDateTime( dateTimeVar, "yyyy.MM.dd HH:nn:ss" )#
</cfoutput>
View dafuq.txt
̶𝕭̶̶ 𝖗̶̶ 𝖆̶̶ 𝖚̶̶ 𝖓̶̶ 𝖐̶̶ 𝖔̶̶ 𝖍̶̶ 𝖑̶̶ 𝖊̶
http://qaz.wtf/u/convert.cgi?text=Braunkohle