This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Convenience method to retreive the default memento and rename the primary key in the struct, if necessary | |
* | |
* @renameKey boolean Whether or not to rename the primary key column of the structure to reflect the entity name (important for auto-population of new models) | |
* @recurse boolean Whether to recurse in to the `to-many` arrays and provide the PKs of those relationships | |
**/ | |
public function asStruct( renameKey=false, recurse=false ){ | |
var s = getMemento( recurse=arguments.recurse ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* | |
* @displayname Encryption Service Model | |
* @description This is a encryption Service Model | |
* | |
**/ | |
component | |
singleton | |
{ | |
property name="bCrypt" inject="BCrypt@BCrypt"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
this.datasource = "myApp"; | |
// ORM SETTINGS | |
this.ormEnabled = true; | |
this.ormSettings = { | |
// ENTITY LOCATIONS, ADD MORE LOCATIONS AS YOU SEE FIT | |
cfclocation=[ "models", "modules", "modules_app" ], | |
// THE DIALECT OF YOUR DATABASE OR LET HIBERNATE FIGURE IT OUT, UP TO YOU TO CONFIGURE | |
//dialect = "MySQLwithInnoDB", | |
// DO NOT REMOVE THE FOLLOWING LINE OR AUTO-UPDATES MIGHT FAIL. | |
dbcreate = "update", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
user www-data; | |
worker_processes 4; | |
pid /run/nginx.pid; | |
events { | |
worker_connections 768; | |
# multi_accept on; | |
} | |
http { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global | |
log /dev/log local0 | |
log /dev/log local1 notice | |
chroot /var/lib/haproxy | |
stats socket /run/haproxy/admin.sock mode 660 level admin | |
stats timeout 30s | |
user haproxy | |
group haproxy | |
daemon | |
maxconn 1024 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
source ~/.bashrc | |
cd /tmp | |
# get a list of all the databases | |
DBS=`mysql -u${MYSQL_USER} --password=${MYSQL_PASS} -e"SHOW DATABASES;" --batch -s` | |
# Loop through all the databases and create a dump of each one, followed by | |
# piping to gzip to create a compressed verison of the dump. | |
for db in $DBS; do | |
if [ "$db" != "information_schema" ] && [ "$db" != "performance_schema" ]; then | |
file=${db}-$(date +%Y-%m-%d)-$(date +%s).sql |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
function downloadFile( required string filePath ){ | |
var file_separator = '/'; | |
var mimeType=getMimeType(arguments.filePath); | |
if(findNoCase("windows",server.os.name)){ | |
file_separator = '\'; | |
} | |
cfheader( name="Content-disposition" value="attachment;filename=#scrubFileName(listLast(filePath,file_separator))#" ); | |
cfcontent( type="#mimeType#" file="#arguments.filePath#" deleteFile="true" reset="true" ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use_bayes 1 | |
skip_rbl_checks 0 | |
dns_available yes | |
bayes_auto_learn 1 | |
bayes_auto_learn_threshold_spam 5.0 | |
use_pyzor 1 | |
pyzor_path /usr/bin/pyzor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This series of commands was used to migrate an existing Railo installation to Lucee | |
# I didn't rename the railo_ctl shell so as not to muck with the existing auto-start configuration, but I'll update this later when I do | |
# You might want to run these one at a time on your own server - unless you're feeling brave :) | |
cd /tmp && \ | |
tar -cvfz railo.bak.tar.gz /opt/railo && \ | |
mkdir lucee_upgrade && \ | |
cd lucee_upgrade && \ | |
wget https://bitbucket.org/lucee/lucee/downloads/lucee-4.5.0.042-jars.zip && \ | |
unzip lucee-4.5.0.042-jars.zip && \ | |
httpd -k stop && \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Staging Server Deployment script for Cygwin | |
branch=${parameter:-'HEAD'} | |
repo_dir="/srv/local-repos/myrepo.git" | |
dest_dir="/home/my-deployment-directory/wwwroot" | |
server_name="My Staging Server" | |
echo -e "Pulling latest repository updates from branch ${branch}...\n" |
NewerOlder