sudo apt-get install python3-pip
sudo pip3 install virtualenv
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(); |
{ | |
"buttons": [ | |
"Puas", | |
"Kurang puas", | |
"Tidak puas" | |
], | |
"content": "Apakah Anda puas dengan pelayanan kami?", | |
"footer": "Pesan dikirim oleh mending.ngoding" | |
} |
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); |
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"]); |
function joke() { | |
let result = UrlFetchApp.fetch("https://jokes-bapack2-api.yuana.id/v1/text/random").getContentText(); | |
let data = JSON.parse(result); | |
return data["data"]; | |
} |
function shortlink(url) { | |
let result = UrlFetchApp.fetch("https://tinyurl.com/api-create.php?url=" + encodeURI(url)); | |
return result.getContentText(); | |
} |
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', | |
}; |
puts "Afin" |
# 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 |