This file contains hidden or 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
| # ubuntu 14.10 server | |
| sudo apt-get update | |
| #sudo apt-get install node | |
| #sudo apt-get install nodejs | |
| #sudo apt-get install npm | |
| # set up rest http://www.getrailo.org/index.cfm/whats-up/railo-40-beta-released/features/rest-services/ | |
| # set up ngrok on mac https://www.twilio.com/blog/2013/10/test-your-webhooks-locally-with-ngrok.html |
This file contains hidden or 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
| // aws cloudformation describe-stacks --region ap-southeast-2 | jq '.Stacks[] | select( .Parameters[0].ParameterValue == "s3://" ) | { StackId }' | |
| { | |
| "StackId": "arn:aws:cloudformation:ap-southeast-2:xxxxxxx", | |
| "Description": "Cache Cluster", | |
| "Parameters": [ | |
| { | |
| "ParameterValue": "SecurityGroupWebCacheCluster", | |
| "ParameterKey": "SecurityGroup" | |
| }, |
This file contains hidden or 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 | |
| NOW=$(date +"%m-%d-%Y") | |
| file="$NOW.appname.tar.gz" | |
| sourcedir='/var/www/appname/public_html' | |
| bucketname="s3://bucketname/$file" | |
| echo "backing up $sourcedir to /tmp/$file & then to s3 bucket $bucketname" | |
| tar -zcvf /tmp/$file $sourcedir | |
| echo 'all backed up now s3 move' |
This file contains hidden or 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
| { | |
| "Statement": [ | |
| { | |
| "Effect": "Allow", | |
| "Action": [ | |
| "s3:GetObject", | |
| "s3:PutObject", | |
| "s3:GetObjectAcl", | |
| "s3:PutObjectAcl", | |
| "s3:ListBucket", |
This file contains hidden or 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> | |
| QueueName = "QTransactions"; | |
| durable = true; | |
| loadPaths = arrayNew(1); | |
| loadPaths[1] = expandPath("lib/rabbitmq-java-client-bin-2.8.4/rabbitmq-client.jar"); | |
| // load jars | |
| javaLoader = createObject("component", "lib.javaloader.JavaLoader").init(loadPaths); |
This file contains hidden or 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
| [ | |
| // cf tags | |
| // | |
| // cfabort | |
| { "keys": ["command+shift+a"], "command": "insert_snippet", "args": {"contents": "<cfabort>" } }, | |
| // cfdump | |
| { "keys": ["command+shift+d"], "command": "insert_snippet", "args": {"contents": "<cfdump var=\"#${0:$SELECTION}#\">" } }, | |
| // cfoutput | |
| { "keys": ["command+shift+o"], "command": "insert_snippet", "args": {"contents": "<cfoutput>${0:$SELECTION}</cfoutput>" } }, |
This file contains hidden or 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
| <cfcomponent output="false"> | |
| <cffunction name="get" access="remote"> | |
| <cfargument name="type" required="true" /> | |
| <cfargument name="stArguments" required="true" /> | |
| <cfscript> | |
| //var listToArray(arguments.type, '_'); | |
| var qGet = ""; | |
| var aColumns = arrayNew(1); |
This file contains hidden or 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
| <cfset stArgumentStructure = deserializeJSON(arguments.jsonStructure) /> | |
| <cfloop collection="#stArgumentStructure#" item="argumentItem"> | |
| <cfif (isStruct(stArgumentStructure[argumentItem]))> | |
| <!--- structure we'll loop down one level... ---> | |
| <cfloop collection="#stArgumentStructure[argumentItem]#" item="argumentItemChildren"> | |
| <cfif isNumeric(stArgumentStructure[argumentItem][argumentItemChildren])> | |
| <cfset stArgumentStructure[argumentItem][argumentItemChildren] = trim(numberformat(stArgumentStructure[argumentItem][argumentItemChildren], '__________________________________________________________')) /> | |
| </cfif> | |
| </cfloop> |
This file contains hidden or 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
| keytool -genkey -dname "cn=127.0.0.1, ou=CF, o=robjshaw, L=Sydney, ST=NSW, C=AU" -keyalg rsa -keystore mykey | |
| keytool -importkeystore -srckeystore mykey -destkeystore mykeyout.p12 -deststoretype PKCS12 |
This file contains hidden or 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
| sudo apt-get update | |
| sudo apt-get upgrade | |
| sudo apt-get install openssh-server | |
| sudo reboot | |
| ## shared folders |