Skip to content

Instantly share code, notes, and snippets.

View aryomuzakki's full-sized avatar

Muhammad Aryo Muzakki aryomuzakki

View GitHub Profile
@gquittet
gquittet / tailwind-gauge-chart.html
Last active July 29, 2024 20:29
tailwind gauge chart
<!-- percent to deg => Math.round(((value / 100) * 180 - 45) * 10) / 10 -->
<div class="relative flex aspect-[2] items-center justify-center overflow-hidden rounded-t-full bg-blue-400">
<div class="absolute top-0 aspect-square w-full rotate-[calc(72deg-45deg)] bg-gradient-to-tr from-transparent from-50% to-white to-50% transition-transform duration-500"></div>
<div class="absolute top-1/4 flex aspect-square w-3/4 justify-center rounded-full bg-blue-100"></div>
<div class="absolute bottom-0 w-full truncate text-center text-[20vmax] leading-none">40%</div>
</div>
@Sinequanonh
Sinequanonh / telegram-bot.js
Last active September 8, 2024 15:10
Nodejs script to send Telegram push notifications
const TelegramBot = require('node-telegram-bot-api');
// replace the value below with the Telegram token you receive from @BotFather
const token = YOUR_TOKEN;
// read the doc from https://github.com/yagop/node-telegram-bot-api to know how to catch the chatId
const chatId = CHAT_ID;
const bot = new TelegramBot(token, { polling: false });
const telegrambot = (message, json) => {
@dehamzah
dehamzah / generate.js
Last active October 27, 2024 00:48
Generate secret key in NodeJS
require('crypto').randomBytes(48, function(err, buffer) { var token = buffer.toString('hex'); console.log(token); });
@mesgarpour
mesgarpour / appsScript_ListFilesFolders_ver.2.js
Last active September 11, 2024 03:48
[Google Apps Script] List all files & folders in a Google Drive folder, & write into a speadsheet
/*
* Copyright 2017 Mohsen Mesgarpour
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software