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
import { useState } from 'react'; | |
import 'bulma/css/bulma.min.css'; | |
const Home = () => { | |
const [contact, setContact] = useState({ | |
name: '', | |
email: '', | |
subject: 'StaticForms - Contact Form', | |
honeypot: '', // if any value received in this field, form submission will be ignored. | |
message: '', |
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
# Count IP address from nginx log file https://www.mkyong.com/nginx/count-ip-address-in-nginx-access-logs/ | |
sudo awk '{print $1}' /var/log/nginx/access.log | sort | uniq -c | sort -nr |
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
user nginx; | |
worker_processes auto; | |
error_log /var/log/nginx/error.log; | |
pid /var/run/nginx.pid; | |
events { | |
worker_connections 1024; | |
} |
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
@Grab('javax.mail:mail:1.4.7') | |
import java.util.Properties | |
import javax.mail.* | |
import javax.mail.internet.* | |
final String FROM = "[email protected]" // Replace with your "From" address. This address or domain must be verified. | |
final String TO = "[email protected]" // Replace with a "To" address. If your account is still in the | |
// sandbox, this address must be verified. |
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
"/"(view:"/blog/index") | |
"/admin"(view:"/admin/index") |
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
package com.hussain.pf | |
import groovy.xml.MarkupBuilder | |
import org.apache.commons.lang.StringEscapeUtils | |
import org.codehaus.groovy.grails.plugins.web.taglib.ValidationTagLib | |
class CustomValidationTagLib extends ValidationTagLib { | |
/** |