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
<script>
var sound = new Howl({
src: ['sound.mp3']
});
sound.play();
</script>
<script>
var ab = "hallo dunia";
function test() {
ab = "hello world";
alert(ab);
}
test();
</script>
<script>
function hay(){
var hey = "";
}
function ubah() {
hey = "hallo teman";
}
ubah();
<script>
// contoh benar
let a = "";
function aku(){
a = "apa cuk";
alert(a);
}
aku();
// contoh benar dalam scope
<script>
const ab = "iyalah";
ab = "assa";
function hayoloh(){
ab = "assoo";
alert(ab);
}
<script>
const gebetan = {
"nama": "",
"status": ""
}
function siapaDia() {
gebetan.nama = "Nadia";
gebetan.status = "pacar orang";
alert(gebetan.nama + " " + gebetan.status);
@mrtampan
mrtampan / gist:fb7a7783f64994a798cf68e9598a79b8
Created January 20, 2020 19:21
spring konfig applicationproperties
spring.mail.host=smtp.gmail.com
spring.mail.username=mrtampan54@gmail.com
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
<!-- Mail Spring -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-mail</artifactId>
<version>2.0.1.RELEASE</version>
</dependency>
@Controller
@RequestMapping(value="test")
public class TestController{
@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);