Skip to content

Instantly share code, notes, and snippets.

View dadinugroho's full-sized avatar

Daniel Adinugroho dadinugroho

  • Semarang, Indonesia
View GitHub Profile
@dadinugroho
dadinugroho / welcome.js
Last active August 6, 2021 02:22
simple forwarded whatsapp message using twilio functions
exports.handler = function(context, event, callback) {
const fromNo = event.From;
const message = event.Body;
let client = context.getTwilioClient();
client.messages
.create({
from: `whatsapp:${context.TWILIO_NO}`,
body: `Forwarded message *${message}* from *${fromNo}*.`,
@dadinugroho
dadinugroho / comment.js
Created July 20, 2021 08:21
Comment List and Form
function addComment() {
const commentContent = document.getElementById('comment').value;
if (commentContent) {
const list = document.getElementById('commentList');
const newComment = document.createElement('li');
newComment.appendChild(document.createTextNode(commentContent));
list.appendChild(newComment);
}
@dadinugroho
dadinugroho / .env
Created May 2, 2021 04:45
Running ngrok from nodejs and send the address through TelegramBot
# Repalce 1234567890:tHiSiStHeToKeNr3C31v3DfRoMb0Tf@Th3r with your token given by @BotFather
TELEGRAM_BOT_API=1234567890:tHiSiStHeToKeNr3C31v3DfRoMb0Tf@Th3r
@dadinugroho
dadinugroho / weigted-link-rotator.php
Last active May 1, 2021 15:25
PHP weighted link rotators