Skip to content

Instantly share code, notes, and snippets.

// Install Deno: https://deno.land.
// Run with the command
// deno bench
const array1 = crypto.getRandomValues(new Uint8Array([1024 * 1024]));
const array2 = crypto.getRandomValues(new Uint8Array([1024 * 1024]));
const array3 = crypto.getRandomValues(new Uint8Array([1024 * 1024]));
const array4 = crypto.getRandomValues(new Uint8Array([1024 * 1024]));
const array5 = crypto.getRandomValues(new Uint8Array([1024 * 1024]));
@rojvv
rojvv / README.md
Last active June 13, 2022 08:05
Scrape VejînLex to find the parts of speech of a Kurdish word and return the results as an array

Usage

import { getPos } from "./getPos.ts";

const pos = await getPos("سڵاو");

console.log(pos); // Expected result: [ "noun" ]
@rojvv
rojvv / tweet.ts
Last active April 15, 2022 14:16
Tweet with Deno using Puppeteer
import type { Browser } from "https://deno.land/x/[email protected]/mod.ts";
// I do not like having the functions here as class methods because they are meant to be used as utilities.
// But you could have them in a class. :)
const endpoint = "https://twitter.com";
/**
* Visits Twitter and signs in with the provided credentials if not already signed in.
*/

The simplest way

ffmpeg -re -i <your_input> -c:v libx264 -c:a aac -f flv <stream_url>/<stream_key>
  • -re reads the input at native frame rate, doing this is recommended by FFmpeg.
  • -c:v libx264 encodes the video of the output in libx264, the required video encoding by Telegram.
  • -c:a aac encodes the audio of the output in aac, the required audio encoding by Telegram.
  • -f flv sets the format of the output to flv, the required format by Telegram.
@rojvv
rojvv / README.md
Created December 11, 2021 14:44
Follower Blocker

Follower Blocker

This is a small script for blocking all GitHub followers easily.

Running

  1. Set the username and authToken variables to your credentials.

  2. Run:

@rojvv
rojvv / your_first_python_telegram_bot.py
Last active December 28, 2022 08:49
یەکەم بۆتی تەلەگرامت بە پایسۆن
from telegram.ext import Updater, CommandHandler, MessageHandler, Filters
def start(update, context):
update.message.reply_text(
"تۆ منت دەست پێ کرد!"
)
def echo(update, context):