Skip to content

Instantly share code, notes, and snippets.

@MeinLiX
MeinLiX / SpeechToText.cs
Created January 20, 2022 15:02
Speech to Text (GCP) Telegram Bot
using Google.Cloud.Speech.V1;
using Telegram.Bot;
using static Google.Cloud.Speech.V1.RecognitionConfig.Types;
dotenv.net.DotEnv.Load();
string TELEGRAM_BOT_TOKEN = Environment.GetEnvironmentVariable("TELEGRAM_BOT_TOKEN") ?? throw new NullReferenceException("TELEGRAM_BOT_TOKEN");
string GOOGLE_APPLICATION_CREDENTIALS = Environment.GetEnvironmentVariable("GOOGLE_APPLICATION_CREDENTIALS") ?? throw new NullReferenceException("GOOGLE_APPLICATION_CREDENTIALS");
string GOOGLE_APPLICATION_PROJECT_ID = Environment.GetEnvironmentVariable("GOOGLE_APPLICATION_PROJECT_ID") ?? throw new NullReferenceException("GOOGLE_APPLICATION_PROJECT_ID");
string GetTestFromSpeech(string FilePath)
{
RecognitionConfig config = new()
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="SubhrajyotiSen/private_whyred" path="device/xiaomi/whyred" remote="private" revision="audio" />
<project
name= "SubhrajyotiSen/whyred"
path= "kernel/xiaomi/whyred"
remote="github" revision="pie" />
<project
name= "LineageOS/android_packages_resources_devicesettings"
@atoponce
atoponce / gist:07d8d4c833873be2f68c34f9afc5a78a
Last active April 25, 2025 13:56 — forked from tqbf/gist:be58d2d39690c3b366ad
Cryptographic Best Practices

Cryptographic Best Practices

Putting cryptographic primitives together is a lot like putting a jigsaw puzzle together, where all the pieces are cut exactly the same way, but there is only one correct solution. Thankfully, there are some projects out there that are working hard to make sure developers are getting it right.

The following advice comes from years of research from leading security researchers, developers, and cryptographers. This Gist was [forked from Thomas Ptacek's Gist][1] to be more readable. Additions have been added from

@ttaubert
ttaubert / onion-gen.js
Created November 2, 2014 13:14
Generating custom .onion names with the WebCrypto API
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
/*
* thirty-two
* https://github.com/chrisumbel/thirty-two
*