Skip to content

Instantly share code, notes, and snippets.

@aliaspooryorik
aliaspooryorik / Iterator.cfc
Last active September 12, 2018 23:43
Iterator based on the IBO pattern
component {
function init(required query data){
setQuery(arguments.data);
return this;
}
/* ---------------------------- PUBLIC ---------------------------- */
/* --- Iterator methods ---------------------------- */
@elpete
elpete / box.json
Created October 25, 2016 23:19
ForgeBox deploys in one command
{
"scripts":{
"postVersion":"package set location='user/repo#v`package version`'",
"onRelease":"publish",
"postPublish":"!git push && !git push --tags"
},
}
@elpete
elpete / .travis.yml
Last active April 29, 2018 02:06
Multi-engine CI for Travis with CommandBox 3.1.0
language: java
sudo: required
jdk:
- oraclejdk8
cache:
directories:
- $HOME/.CommandBox
env:
matrix:
- ENGINE=lucee@4.5
@ryanguill
ryanguill / pbkdf2.cfm
Last active June 21, 2018 15:29
PBKDF2 in CF: This is an example and test of hashing passwords in CFML using PBKDF2. Save this file as pbkdf2.cfm and run it for more information.
<cfscript>
struct function hashPasswordPBKDF2 (required string password, numeric iterations = 10000, numeric saltByteLength = 8) {
if (iterations < 100000) {
throw(message="Iterations must be greater than or equal to 100000");
}
if (saltbytelength < 8) {
throw(message="SaltByteLength must be greater than or equal to 8");
}
@fajrif
fajrif / gist:1265203
Created October 5, 2011 18:12
git clone specific tag
git clone <repo-address>
git tag -l
git checkout <tag-name>
git branch -D master
git checkout -b master