Skip to content

Instantly share code, notes, and snippets.

View bardware's full-sized avatar

Bernhard Döbler bardware

View GitHub Profile
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active May 22, 2024 19:02
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

Application.cfc
component extends=framework.one {
this.ormenabled = true;
this.datasource = "store";
this.ormSettings.dbCreate = "dropcreate";
this.ormSettings.logsql = true;
this.ormSettings.dialect = "Oracle10g";
variables.framework.reloadApplicationOnEveryRequest = true;
@aaronhoffman
aaronhoffman / git-bc.cmd
Created March 2, 2017 02:50
Configure Beyond Compare 4 as git diff tool on windows 10
git config --global diff.tool bc
git config --global difftool.bc.path "C:\Program Files\Beyond Compare 4\BComp.exe"
git config --global merge.tool bc
git config --global mergetool.bc.path "C:\Program Files\Beyond Compare 4\BComp.exe"
git config --global alias.mydiff "difftool --dir-diff --tool=bc --no-prompt"
@JamoCA
JamoCA / ColdFusionNumberTesting.cfm
Last active October 1, 2019 08:56
ColdFusion Validation Testing of Number-like Values w/Leading/Ttrailing Hidden Characters - Chr(28).
<!--- 00501 = Zipcode for Holtsville, NY. 10.50 = Dollar Display Amount
12/29/2016: ColdFusion 2016 indicates valid numeric, float and zipcode. Lucee 5 further indicates valid integer.
9/11/2017: Added CFParam & CFQueryParam Tests to see if value is considered a valid integer by those functions
9/11/2017: Added Dan Bracuk demo to remove commas and compare VAL() to Round(). (Fail) --->
<cfscript>
/* http://cflib.org/udf/IsInt */
function isInt(varToCheck){
return ucase(isNumeric(varToCheck) and round(varToCheck) is vartoCheck);
}
@wilgeno
wilgeno / testClearCache.cfm
Last active July 10, 2017 09:44
CF 2016 clearTrustedCache
<cfscript>
adminUser = "admin";
adminPW = "password";
thefile = "/absolute/path/to/file.cfm";
adminObj = createObject("component","cfide.adminapi.administrator");
adminObj.login(adminPW, adminUser);
adminRuntime = createObject("component","cfide.adminapi.runtime");
adminRuntime.clearTrustedCache(thefile);
</cfscript>
@ClementParis016
ClementParis016 / script.js
Last active October 26, 2023 03:55
TinyMCE characters counter plugin
tinymce.init({
plugins: 'charactercount',
elementpath: false
});
@Leigh-
Leigh- / AWSSignature4-Task3.cfm
Created May 1, 2016 18:17
ColdFusion: AWS Task 3: Calculate the AWS Signature Version 4
<!---
CFML translation of Amazon Web Services Example - Task 3:
http://docs.aws.amazon.com/general/latest/gr/sigv4-calculate-signature.html
--->
<h1>Task 3: Calculate the AWS Signature Version 4</h1>
<div>
<strong>Pseudocode for deriving a signing key</strong>
<pre>
kSecret = Your AWS Secret Access Key
@Leigh-
Leigh- / AWSSignature4-Task1.cfm
Last active July 17, 2018 08:20
ColdFusion: AWS Task 1: Create a Canonical Request for Signature Version 4
<!---
CFML translation of Amazon Web Services Example - Task 1:
http://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html
--->
<h1>Task 1: Create a Canonical Request for Signature Version 4 (ColdFusion)</h1>
<div>
<strong>Canonical request pseudocode</strong>
<pre>CanonicalRequest = HTTPRequestMethod + '\n' +
CanonicalURI + '\n' +
CanonicalQueryString + '\n' +
@Leigh-
Leigh- / EncodeRFC3986.cfm
Created April 18, 2016 05:57
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 "~"
@Leigh-
Leigh- / S3Wrapper.cfc
Last active August 28, 2018 12:15 — forked from christierney402/S3Wrapper.cfc
Amazon Web Services (AWS) S3 Wrapper for ColdFusion (Signature 4)
/**
* Amazon S3 REST Wrapper
* Version Date: 2016-04-12
*
* Copyright 2015 CF Webtools | cfwebtools.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*