Skip to content

Instantly share code, notes, and snippets.

@manniru
manniru / mongo-auth.ts
Created July 30, 2022 18:36 — forked from Macarthurval/mongo-auth.ts
A typescript class to manage Baileys auth states in Mongo database
import { WAProto } from '@adiwajshing/baileys';
import { BufferJSON, initAuthCreds } from '@adiwajshing/baileys/lib/Utils';
import { Collection, Document, MongoClient } from 'mongodb';
import chalk from 'chalk';
export class MongoDbAuth{
static mongoUrl = "mongodb+srv://your-mongodb-url/DBName/?retryWrites=true&w=majority"
sim: string
private collection: Collection
@manniru
manniru / load_json_to_firstore.js
Created September 17, 2022 15:58 — forked from gregfenton/load_json_to_firstore.js
FIRESTORE: a node/javascript command-line script that loads JSON data into a Firestore database (could be cloud or local emulator)
/**
* load_json_to_firstore.js
*
* This code is a "node script" used to load data into your Firestore database, either in "the cloud" or the emulator.
*
* The script is a "client app", so it logs in with Firebase Auth using email/password from the variable USER1.
*
* The USER1 user (the.admin.guy@test.com) must exist in your Firebase project and have write access
* to the collection(s) you are populating. You can create that account via Firebase Console >> Authentication.
*
https://modularfirebase.web.app/common-use-cases/firestore/#crud-operations
const XLSX = require('xlsx');const data = [
{ name: 'Diary', code: 'diary_code', author: 'Pagorn' },
{ name: 'Note', code: 'note_code', author: 'Pagorn' },
{ name: 'Medium', code: 'medium_code', author: 'Pagorn' },
]const workSheet = XLSX.utils.json_to_sheet(data);
const workBook = XLSX.utils.book_new();XLSX.utils.book_append_sheet(workBook, workSheet, "Sheet 1");
XLSX.writeFile(workBook, "./temp/sample.xlsx");
@manniru
manniru / gotify_web_sample.html
Created September 20, 2022 20:10 — forked from erfg12/gotify_web_sample.html
Gotify web app sample code for send and receive.
<html>
<header>
<script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
<script>
// VARIABLES, PLEASE CHANGE
var APP_TOKEN = "AhCGJ-BEC3z.g8Q";
var CLIENT_TOKEN = "C25iT7U7E1xlzSk";
var GOTIFY_SERVER = "localhost:80";
// SEND INFO TO MSG SERVER
@Fazzani
Fazzani / free_m3u8.m3u
Created July 28, 2018 09:13
Free m3u8 streams
http://sample.vodobox.net/skate_phantom_flex_4k/skate_phantom_flex_4k.m3u8
http://playertest.longtailvideo.com/adaptive/wowzaid3/playlist.m3u8
http://cdn-fms.rbs.com.br/vod/hls_sample1_manifest.m3u8
http://nasatv-lh.akamaihd.net/i/NASA_101@319270/index_1000_av-p.m3u8?sd=10&rebase=on
http://content.jwplatform.com/manifests/vM7nH0Kl.m3u8
@manniru
manniru / free_m3u8.m3u
Created December 18, 2022 20:11 — forked from Fazzani/free_m3u8.m3u
Free m3u8 streams
http://sample.vodobox.net/skate_phantom_flex_4k/skate_phantom_flex_4k.m3u8
http://playertest.longtailvideo.com/adaptive/wowzaid3/playlist.m3u8
http://cdn-fms.rbs.com.br/vod/hls_sample1_manifest.m3u8
http://nasatv-lh.akamaihd.net/i/NASA_101@319270/index_1000_av-p.m3u8?sd=10&rebase=on
http://content.jwplatform.com/manifests/vM7nH0Kl.m3u8
@PurpleVibe32
PurpleVibe32 / vmwk17key.txt
Last active May 1, 2024 11:34
Free VMware Workstation Pro 17 full license keys
Install VMWare Workstation PRO 17 (Read it right. PRO!)
Also, these keys might also work with VMWare Fusion 13 PRO. Just tested it.
Sub to me on youtube pls - PurpleVibe32
if you want more keys - call my bot on telegram. @purector_bot (THE BOT WONT REPLY ANYMORE) - Or: https://cdn.discordapp.com/attachments/1040615179894935645/1074016373228978277/keys.zip - the password in the zip is 102me.
---
This gist can get off at any time.
PLEASE, DONT COPY THIS. IF YOU FORK IT, DONT EDIT IT.
*If you have a problem comment and people will try to help you!
*No virus
@manniru
manniru / ddg.sh
Created December 19, 2022 23:22 — forked from j0nk0/ddg.sh
ddg.sh - Search the internet with DuckDuckGo from your terminal
#!/bin/sh
# ddg.sh - Search the internet with DuckDuckGo from your terminal
# Made with boredom, on Christmas Eve, by mftrhu
# Requirements:
# awk, curl OR wget, sed, head, tail, grep, tput (MAYBE)
available () {
command -v "$1" >/dev/null 2>&1
}
@Clybius
Clybius / index.html
Last active May 1, 2024 11:34
Embed AV1/No File Size Capped Videos in Discord
<head>
<meta property="og:image" content="GifToEmbedURL"> # Change the content to the link of a gif of your choice, which will be shown as the embed.
<meta property="og:type" content="video.other">
<meta property="og:video:url" content="VideoToEmbedURL"> # Change the content to the link of a video of your choice. Will work with videos over 50 MB, and even unsupported codecs such as AV1!
<meta property="og:video:width" content="1920"> # Set this to the video's width and height, not required, but will show the video as intended if the aspect ratio and size is correct.
<meta property="og:video:height" content="1080">
</head>