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
# HSTS status | |
curl -s -D- https://example.com/ | grep -i Strict | |
ssh-keygen -t rsa -b 4096 -f ~/.ssh/github_rsa -C "username@hostname" | |
ssh-keygen -t ed25519 -C "[email protected]" -f ~/.ssh/github_ed25519 | |
# Basic add user with SSH | |
sudo adduser <USER> | |
sudo su <USER> | |
ssh-keygen |
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
<!---Place in application.cfc---> | |
<!--- This checks if a cookie is created, for bots this will return false and use the low session timeout ---> | |
<cfif StructKeyExists(cookie, "cfid" ) or StructKeyExists(cookie, "jsessionid" )> | |
<cfset this.sessiontimeout=CreateTimeSpan(0,0,30,0) /> | |
1111 | |
<cfelse> | |
22222 | |
<cfset this.sessiontimeout=CreateTimeSpan(0,0,0,2) /> | |
</cfif> |
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
<cfif structKeyExists(url, 'subject')> | |
<div class="form-group"> | |
<input type="hidden" class="form-control" id="Subject" name="subject" value="#URL.subject#"> | |
</div> | |
<cfelse> | |
<div class="form-group"> | |
<input type="hidden" class="form-control" id="Subject" name="subject" value="Not specified"> | |
</div> | |
</cfif> |
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
//https://mailme.dev.cc/?x=1&a=1&b=2&c=3&d=4 | |
add_action ('wp_loaded', 'my_custom_redirect'); | |
function my_custom_redirect() { | |
if(!empty($_GET['x'])){ | |
//set variables from get | |
$a = sanitize_text_field( $_GET['a'] ); | |
$b = sanitize_text_field( $_GET['b'] ); | |
$c = sanitize_text_field( $_GET['c'] ); | |
$d = sanitize_text_field( $_GET['d'] ); |
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
<cfoutput> | |
<cfheader name="expires" value="#now()#"> | |
<cfheader name="pragma" value="no-cache"> | |
<cfheader name="cache-control" value="no-cache, no-store, must-revalidate"> | |
<!--- | |
The first line says any existing cached items must be expired immediately | |
The second line informs the browser not to cache | |
The third line is like telling the browser to do ctrl F5 and always get a fresh copy from the server when loading the page. | |
---> | |
</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
<cfdump var="#$.globalConfig().getAllValues()#"> | |
<cfdump var="#$.siteConfig().getAllValues()#"> | |
<cfdump var="#$.content().getAllValues()#"> | |
<cfdump var="#$.currentUser().getAllValues()#"> | |
<cfdump var="#$.event().getAllValues()#"> | |
#$.currentUser().getUsername()# | |
#$.content().getTitle()# | |
#$.content().getChildTemplate()# |
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> | |
<!---Set alt tag to be user defined or title as fallback---> | |
function altAltTags(getFileIdVal){ | |
fileid = sub1.getValue('fileid'); | |
if ( sub1.hasImage() ) { | |
fileMeta = getFileIdVal; | |
if ( Len(fileMeta.getAltText())){ | |
writeoutput('alt="#fileMeta.getAltText()#"'); | |
} | |
else{ |