Skip to content

Instantly share code, notes, and snippets.

View mrtampan's full-sized avatar
🎯
Focusing

Achmad Rivaldi mrtampan

🎯
Focusing
  • Bekasi, Indonesia
View GitHub Profile
<template>
<div>
<div class="">
<label >Username</label>
<input type="text" v-model="$v.username.$model">
<small v-if="!$v.username.required">Field is required.</small>
<small v-if="!$v.username.minLength">Username must have at least {{$v.username.$params.minLength.min}} letters</small>
</div>
<div class="">
<label >Password</label>
<div class="">
<label >Username</label>
<input type="text" v-model="$v.username.$model">
<small v-if="!$v.username.required">Field is required.</small>
<small v-if="!$v.username.minLength">Username must have at least {{$v.username.$params.minLength.min}} letters</small>
</div>
<div class="">
<label >Password</label>
<input type="text" v-model="$v.password.$model">
<small v-if="!$v.password.required">Field is required.</small>
import { required, minLength } from 'vuelidate/lib/validators'
export default {
data() {
return {
username: '',
password: ''
}
},
validations: {
@mrtampan
mrtampan / gist:5cc6799fcda55ccc528d5d78c3e97818
Last active January 20, 2020 19:50
javamail simple sender
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.mail.SimpleMailMessage;
import org.springframework.mail.javamail.JavaMailSender;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
@mrtampan
mrtampan / gist:c01d3fbc11a68545adc1cfd31ff0d618
Last active January 20, 2020 19:43
spring mail senderrrr
@Autowired
public JavaMailSender emailSender;
public void sendSimpleMessage(
String to, String subject, String text, String from) {
SimpleMailMessage message = new SimpleMailMessage();
message.setTo(to);
message.setSubject(subject);
message.setText(text);
message.setFrom(from);
@Controller
@RequestMapping(value="test")
public class TestController{
<!-- Mail Spring -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-mail</artifactId>
<version>2.0.1.RELEASE</version>
</dependency>
@mrtampan
mrtampan / gist:fb7a7783f64994a798cf68e9598a79b8
Created January 20, 2020 19:21
spring konfig applicationproperties
spring.mail.host=smtp.gmail.com
[email protected]
spring.mail.password=kamudandia
spring.mail.properties.mail.transport.protocol=smtp
spring.mail.properties.mail.smtp.port=587
spring.mail.properties.mail.smtp.auth=true
spring.mail.properties.mail.smtp.starttls.enable=true
spring.mail.properties.mail.smtp.starttls.required=true
<script>
const gebetan = {
"nama": "",
"status": ""
}
function siapaDia() {
gebetan.nama = "Nadia";
gebetan.status = "pacar orang";
alert(gebetan.nama + " " + gebetan.status);
<script>
const ab = "iyalah";
ab = "assa";
function hayoloh(){
ab = "assoo";
alert(ab);
}