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
/* This will work for any text entry except the forms */ | |
Qualtrics.SurveyEngine.addOnload(function() { | |
var qid = this.questionId; | |
var placeholderText = 'I am different text'; | |
jQuery('#' + qid + ' input[type="text"], #' + qid + ' textarea').attr('placeholder',placeholderText); | |
}); | |
/* | |
This will work on a Form question (where there are multiple inputs) |
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
class NameForm extends React.Component { | |
constructor(props) { | |
super(props); | |
this.state = { name: '' }; | |
} | |
handleChange = (event) => { | |
this.setState({[event.target.name]: event.target.value}); | |
} |
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
# Purge the Heroku Build Cache using the terminal. This requires a new deployment FYI. | |
# Replace appname with name of application on Heroku. | |
heroku plugins:install heroku-repo | |
heroku repo:purge_cache -a appname | |
git commit --allow-empty -m "Purge cache" | |
git push heroku master |
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
# Add HTTP Headers to improve site security. | |
# https://owasp.org/www-project-secure-headers/#tab=Headers | |
# X-Frame-Options: Stop people from loading your site in an iframe on their own site. | |
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options | |
add_header X-Frame-Options "SAMEORIGIN"; | |
# X-XSS-Protection: Stop pages from loading when the browser detects cross-site scripting (XSS) attacks. | |
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-XSS-Protection | |
add_header X-XSS-Protection "1; mode=block"; |
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
<?php | |
/** | |
* Plugin Name: Example Private Files | |
* Author: Doug Cone | |
* Description: Auth for Pantheon Private files | |
* Version: 0.1.0 | |
*/ | |
/** | |
* This doesn't protect direct access, you must move your files to a folder not accessible to the public, but accessible to this script. |
OlderNewer