Skip to content

Instantly share code, notes, and snippets.

@ba5tz
ba5tz / auto-delete-cf-dns.js
Created March 8, 2024 08:16 — forked from azliabdullah/auto-delete-cf-dns.js
bulk delete all DNS records in cloudflare
/**
* 1. open cloudflare dashboard, choose domain, go to DNS section
* 2. open browser's dev tool (via F12 or inspect or however)
* 3. in devtool, go to console tab
* 4. clear all existing messages
* 5. paste all script below
* 6. hit enter and watch
* 7. script only delete records displayed in the screen
* 8. if want to delete more, refresh browser and run script again
*
@ba5tz
ba5tz / terbilang.bas
Last active September 13, 2022 10:35
VBA UDF Terbilang
Function Terbilang(n As Long) As String 'max 2.147.483.647
' Auth : Andi setiadi
' Youtube : youtube.com/andisetiadii
Dim satuan As Variant, Minus As Boolean
On Error GoTo terbilang_error
satuan = Array("", "Satu", "Dua", "Tiga", "Empat", "Lima", "Enam", "Tujuh", "Delapan", "Sembilan", "Sepuluh", "Sebelas")
If n < 0 Then
Minus = True
n = n * -1
Function IMAGE(URL As String)
' Andi Setiadi
'----------------------
'Youtube Channel @ Https://youtube.com/andisetiadii
Dim CellSaya As Range
On Error Resume Next
Set CellSaya = Application.Caller
'hapus dulu
ActiveSheet.Pictures("GB_" & CellSaya.Address(False, False)).Delete
@ba5tz
ba5tz / VBAwebcam.bas
Created January 22, 2022 03:53
VBA Webcam
' WebCam VBA by Andi Setiadi
' Blog [ setiadi.my.id | arrayformula.com ]
Sub Webcam()
Const FileCam As String = "image.bmp"
Const ModCam As String = "CommandCam.exe"
ChDir ThisWorkbook.Path
If Dir(FileCam) > "" Then Kill (FileCam)
@ba5tz
ba5tz / FormulaSpellEng.txt
Created December 17, 2020 09:19
Spellnumber Excel formula
=IF(OR(LEN(FLOOR(B2,1))=13,FLOOR(B2,1)<=0),"Out of range",PROPER(SUBSTITUTE(CONCATENATE(CHOOSE(MID(TEXT(INT(B2),REPT(0,12)),1,1)+1,"","one hundred ","two hundred ","three hundred ","four hundred ","five hundred ","six hundred ","seven hundred ","eight hundred ","nine hundred "),CHOOSE(MID(TEXT(INT(B2),REPT(0,12)),2,1)+1,"",CHOOSE(MID(TEXT(INT(B2),REPT(0,12)),3,1)+1,"ten","eleven","twelve","thirteen","fourteen","fifteen","sixteen","seventeen","eighteen","nineteen"),"twenty","thirty","forty","fifty","sixty","seventy","eighty","ninety"),IF(VALUE(MID(TEXT(INT(B2),REPT(0,12)),2,1))>1,CHOOSE(MID(TEXT(INT(B2),REPT(0,12)),3,1)+1,"","-one","-two","-three","-four","-five","-six","-seven","-eight","-nine"),IF(VALUE(MID(TEXT(INT(B2),REPT(0,12)),2,1))=0,CHOOSE(MID(TEXT(INT(B2),REPT(0,12)),3,1)+1,"","one","two","three","four","five","six","seven","eight","nine"),"")),IF(B2>=10^9," billion ",""),CHOOSE(MID(TEXT(INT(B2),REPT(0,12)),4,1)+1,"","one hundred ","two hundred ","three hundred ","four hundred ","five hundred ","six
@ba5tz
ba5tz / MsgboxColorText.bas
Created September 10, 2019 00:35
Membuat Text di Msgbox Berwarna ( Coloring Text on Msgbox)
Option Explicit
#If Win64 Then
Private Declare PtrSafe Function GetSysColor Lib "user32"(ByVal nIndex As Long) As Long
Private Declare PtrSafe Function SetSysColors Lib "user32" _
(ByVal nChanges As Long, lpSysColor As Long, lpColorValues As Long) As Long
#Else
Private Declare Function GetSysColor Lib "user32" (ByVal nIndex As Long) As Long
Private Declare Function SetSysColors Lib "user32" _
(ByVal nChanges As Long, lpSysColor As Long, lpColorValues As Long) As Long
@ba5tz
ba5tz / MD5.vb
Created April 13, 2019 03:54 — forked from ken-itakura/MD5.vb
Excel, Access VBA Function to create MD5 for text
Public Function MD5Hex(textString As String) As String   
Dim enc   
Dim textBytes() As Byte   
Dim bytes   
Dim outstr As String       
Set enc = CreateObject("System.Security.Cryptography.MD5CryptoServiceProvider")   
textBytes = textString   
bytes = enc.ComputeHash_2((textBytes))