Skip to content

Instantly share code, notes, and snippets.

View ZTRdiamond's full-sized avatar
:bowtie:
blubuk blubuk

Fatahillah Al makarim ZTRdiamond

:bowtie:
blubuk blubuk
View GitHub Profile
@ZTRdiamond
ZTRdiamond / trakteer-api.js
Created April 13, 2024 13:54
Just a trakteer api.
const axios = require('axios');
class TrakteerAPI {
constructor(cookies) {
this.cookies = cookies;
this.headers = {
'Accept': 'application/json',
'Accept-Language': 'id-ID,id;q=0.9,en-US;q=0.8,en;q=0.7',
'Content-Type': 'application/json',
'User-Agent': 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Mobile Safari/537.36',
/*
Author: https://github.com/ZTRdiamond
Source: https://whatsapp.com/channel/0029VagFeoY9cDDa9ulpwM0T
Pesan: lu gabisa pake cheerio dan skill issue saat pakenya? regex-kan saja
*/
const axios = require('axios');
async function ttdl(url) {
try {
if(!url) return { status: false, message: "undefined reading url!" };
return await new Promise(async(resolve, reject) => {
@ZTRdiamond
ZTRdiamond / youtube-downloader.js
Last active January 8, 2025 15:54
YouTube Downloader Scraper
import axios from "axios";
import jwt from "jsonwebtoken"
import UrlPattern from 'url-pattern';
import qs from 'query-string';
// jwt generator
const privateKey = `-----BEGIN EC PRIVATE KEY-----
MHcCAQEEIF7u6fQ1RaVV7YUg+dOD0j6upkFJ1fNQZ4nzz8n0m1zboAoGCCqGSM49
AwEHoUQDQgAEuG6npq0n2HHW+kKK2x2RfMh0J/AzwJeXgUKuMvzC2aXoKZyTLNf+
TNX1cfH+h+aMkOhenIabeiHsjdiHzX/n54lM/g==
@ZTRdiamond
ZTRdiamond / spotify-downloader.js
Created July 15, 2024 03:00
Free spotify downloader that you can use for your projects, this code only support for track url and not playlist or etc.
import { parse as urlParser } from "spotify-uri";
import axios from "axios";
async function spotifydl(url) {
try {
if(!url) return { status: false, message: "undefined reading url!" };
return await new Promise(async(resolve, reject) => {
const trackId = (urlParser(url)).id;
if(!trackId) return reject("invalid spotify track url!");
axios.get(`https://api.spotifydown.com/download/` + trackId, {
@ZTRdiamond
ZTRdiamond / text2imageFast.js
Last active July 22, 2024 10:38
Text to image generator AI, this scrape can generate AI image between 5 - 15 seconds
/*
Created by https://github.com/ztrdiamond !
Source: https://whatsapp.com/channel/0029VagFeoY9cDDa9ulpwM0T
"Aku janji jika hapus watermark ini maka aku rela miskin hingga 7 turunan"
*/
import axios from 'axios';
import FormData from 'form-data';
async function text2imageFast(prompt) {
@ZTRdiamond
ZTRdiamond / pixelart_ai.js
Last active July 29, 2024 12:55
Make a pixelart image easily using AI
/*
Created by https://github.com/ztrdiamond !
Source: https://whatsapp.com/channel/0029VagFeoY9cDDa9ulpwM0T
"Aku janji jika hapus watermark ini maka aku rela miskin hingga 7 turunan"
*/
import axios from "axios";
import FormData from "form-data";
async function pixelart(prompt) {
@ZTRdiamond
ZTRdiamond / musicRecognition.js
Created July 30, 2024 02:44
Find music very easy using music recognition
/*
Created by https://github.com/ztrdiamond !
Source: https://whatsapp.com/channel/0029VagFeoY9cDDa9ulpwM0T
"Aku janji jika hapus watermark ini maka aku rela miskin hingga 7 turunan"
*/
import axios from "axios";
async function musicRecognition(url) {
try {
@ZTRdiamond
ZTRdiamond / simple_quotly_chat.js
Last active August 6, 2024 09:32
Simple and easy usage quotly chat generator.
/*
Created by https://github.com/ztrdiamond !
Source: https://whatsapp.com/channel/0029VagFeoY9cDDa9ulpwM0T
"Aku janji jika hapus watermark ini maka aku rela miskin hingga 7 turunan"
*/
import axios from "axios";
async function quotlyChat(ctx) {
try {
@ZTRdiamond
ZTRdiamond / remove_bg_ai.js
Created August 11, 2024 07:18
Remove background image using AI for free!
import axios from "axios";
/*
Created by https://github.com/ztrdiamond !
Source: https://whatsapp.com/channel/0029VagFeoY9cDDa9ulpwM0T
"Aku janji jika hapus watermark ini maka aku rela miskin hingga 7 turunan"
*/
async function removebg(buffer) {
try {
@ZTRdiamond
ZTRdiamond / video2audio.js
Last active January 31, 2025 17:59
A lightweight video to audio converter using online web converter to optimalize your system performance.
import axios from "axios";
import FormData from "form-data";
/*
Created by https://github.com/ztrdiamond !
Source: https://whatsapp.com/channel/0029VagFeoY9cDDa9ulpwM0T
"Aku janji jika hapus watermark ini maka aku rela miskin hingga 7 turunan"
*/
async function video2audio(buffer) {