Skip to content

Instantly share code, notes, and snippets.

View miftahafina's full-sized avatar
🏠
Work from heaven

Miftah Afina miftahafina

🏠
Work from heaven
View GitHub Profile
@miftahafina
miftahafina / tugas-pegawai.gs
Last active June 26, 2024 12:06
Membuat Auto Update Dropdown Google Forms Menggunakan Data Google Sheets + Kirim Email via Google Forms - Full Tutorial https://youtu.be/XAUtW6HFwaE
function updateForm() {
// nama sheet dan url
const sheetName = 'Data Pegawai';
const spreadsheetUrl = 'URL_SPREADSHEET_ANDA';
// akses sheet
const spreadsheet = SpreadsheetApp.openByUrl(spreadsheetUrl);
const sheet = spreadsheet.getSheetByName(sheetName);
const lastRow = sheet.getLastRow();
@miftahafina
miftahafina / message
Created January 30, 2023 09:00
Message whatsapp berisi quick reply buttons - Tutorial selengkapnya https://youtu.be/WPNbvc6lj3U
{
"buttons": [
"Puas",
"Kurang puas",
"Tidak puas"
],
"content": "Apakah Anda puas dengan pelayanan kami?",
"footer": "Pesan dikirim oleh mending.ngoding"
}
@miftahafina
miftahafina / CekNilai.gs
Created December 8, 2022 11:29
Mengambil Data dari Google Sheets Melalui WhatsApp - Full Tutorial https://youtu.be/WPNbvc6lj3U
function cekNilai(nis) {
// Buka sheet
let sheetUrl = "URL_GOOGLE_SHEETS";
let file = SpreadsheetApp.openByUrl(sheetUrl);
let sheet = file.getSheetByName("Sheet1");
let last_row = sheet.getLastRow();
// Ambil data
let nilai_list = sheet.getRange(`A2:C${last_row}`).getValues();
let nilai_filtered = nilai_list.filter(el => el[0] == nis);
@miftahafina
miftahafina / PendaftaranOnline.gs
Last active November 8, 2024 05:37
Input Data dari WhatsApp ke Google Sheet - Full Tutorial: https://youtu.be/UOpdL3wrivg
function doPost(e) {
// Buka sheet
let sheetUrl = "YOUR_SHEET_URL";
let file = SpreadsheetApp.openByUrl(sheetUrl);
let sheet = file.getSheetByName("Sheet1");
// Rapikan data
let req = JSON.stringify(e).replace(/\\/g, "").replace("}\"", "}").replace("\"{", "{");
let reqJson = JSON.parse(req);
let senderMessage = JSON.stringify(reqJson["postData"]["contents"]["senderMessage"]);
@miftahafina
miftahafina / jokes-bapack2.gs
Last active September 15, 2022 04:31
Random Jokes Bapack2 on your gsheet
function joke() {
let result = UrlFetchApp.fetch("https://jokes-bapack2-api.yuana.id/v1/text/random").getContentText();
let data = JSON.parse(result);
return data["data"];
}
@miftahafina
miftahafina / Code.gs
Last active February 26, 2023 11:00
Memperpendek URL di Google Sheet Dengan Mudah
function shortlink(url) {
let result = UrlFetchApp.fetch("https://tinyurl.com/api-create.php?url=" + encodeURI(url));
return result.getContentText();
}
@miftahafina
miftahafina / Code.gs
Last active August 7, 2023 06:28
Integrasi WhatsApp dengan Google Forms dan Google Sheets - Full tutorial: https://www.youtube.com/watch?v=fZ1-seZFrSc
function SendMessage(nomor_wa, pesan)
{
var url = 'https://pati.wablas.com/api/v2/send-message';
var token = 'YOUR_SECURITY_TOKEN_HERE';
var headers = {
'Authorization' : token,
'content-type' : 'application/json',
};
@miftahafina
miftahafina / install virtualenv ubuntu 16.04.md
Created November 23, 2021 08:32 — forked from Geoyi/install virtualenv ubuntu 16.04.md
How to install virtual environment on ubuntu 16.04

How to install virtualenv:

Install pip first

sudo apt-get install python3-pip

Then install virtualenv using pip3

sudo pip3 install virtualenv 
puts "Afin"
@miftahafina
miftahafina / tar-cheat-sheet.sh
Last active May 28, 2021 03:59
Tar Linux Cheat Sheet
# Membuat arsip
tar -cvf arsip.tar ~/nama-folder
tar -cvzf arsip.tar.gz ~/nama-folder
tar -cvjf arsip.tar.bz2 ~/nama-folder
# Ekstrak arsip
tar -xvf arsip.tar
tar -xvf arsip.tar.gz
tar -xvf arsip.tar.bz2