Skip to content

Instantly share code, notes, and snippets.

View bardware's full-sized avatar

Bernhard Döbler bardware

View GitHub Profile
anonymous
anonymous / trycf-gist.cfm
Created December 7, 2017 20:57
TryCF Gist
<cfset dNow = Now()>
<cfset dateTimeVar = #dateTimeFormat( dNow, "yyyy.MM.dd HH:nn:ss" )# />
<cfdump var="#dNow#">
<cfdump var="#dateTimeVar#">
<cfscript>
function fixedParseDateTime (dte, mask) {
var sdf = createObject("java", "java.text.SimpleDateFormat").init(mask);
return sdf.parse(dte);
}
@gbakernet
gbakernet / sassmacros.xml
Created May 18, 2012 08:33
Sass Macros for Ant
<?xml version="1.0"?>
<!--
# Sass Macros for Ant
# http://github.com/gbakernet
# Authored 2012 Glenn Baker; Licensed MIT */
<sass> Usage - Compile sass files
* jarpath - is path to jruby-complete.jar and gem-sass.jar
* src - input
* dest - output
@elijahmanor
elijahmanor / package.json
Created January 10, 2018 14:46
npm script with color!
{
"name": "colors",
"version": "0.1.0",
"description": "",
"main": "index.js",
"scripts": {
"color1": "echo '\\033[31mHello\\033[0m World'",
"color2": "echo \"\\033[31mHello\\033[0m World\""
},
"keywords": [],
@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
@elijahmanor
elijahmanor / .prettierrc
Created March 20, 2018 01:52
Prettier Overrides per fileType
{
"singleQuote": true,
"overrides": [
{
"files": "src/**/*.css",
"options": {
"singleQuote": false
}
}
]
@albertpastrana
albertpastrana / README.md
Created December 10, 2015 15:23 — forked from alechill/README.md
Set up git prompt

Single liner script to fetch and setup the useful git-prompt and git-completion utilities with your bash profile prompt

To use:

  • Copy script, paste on command line, hit enter

Enjoy:

  • Pretty colours man
  • Clear directory path info
  • If in git controlled dir, the current branch name (yay!)
  • Hit tab when typing git commands to complete the commands, remotes, and branch names (soo goddamn yay!)
@JamoCA
JamoCA / CSVtoQuery.cfm
Last active April 13, 2018 14:52
Convert CSV File to Coldfusion Query Object using ColdFusion & opencsv (Java)
<!---
Convert CSV file to a ColdFusion query object using opencsv.
Requirements:
- ColdFusion 8+ ( http://en.wikipedia.org/wiki/Adobe_ColdFusion )
- opencsv - free parser library for Java ( http://opencsv.sourceforge.net/ )
http://opencsv.sourceforge.net/
opencsv supports all the basic csv-type things you're likely to want to do:
- Arbitrary numbers of values per line
- Ignoring commas in quoted elements
- Handling quoted entries with embedded carriage returns (ie entries that span multiple lines)
@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' +
@anthrotype
anthrotype / ttdiff.sh
Last active July 18, 2018 10:03
Compare fonts with fonttools ttx
# compare fonts with ttx
ttdiff () {
if [ "$#" -lt 2 ]
then
echo "Usage: ttdiff FONT1.ttf FONT2.ttf [tables ...]"
return 1
fi
first="$1"
if [ ! -f "$first" ]; then
echo "File $first not found"
@bennadel
bennadel / java-cast-arrays.cfm
Created October 9, 2013 13:07
Creating Typed Java Arrays In ColdFusion Using JavaCast()
<cfscript>
// Byte arrays. Binary data is represented by an array of bytes.
// And, each byte is represented by an integer. For simple values,
// we don't have to manually cast each value - we can just pass-in
// the array and ColdFusion will perform the cast.
// Test 1 - Spell "SARAH" with ColdFusion numbers.
bytes = javaCast(