Skip to content

Instantly share code, notes, and snippets.

View yousuf-hossain-shanto's full-sized avatar
🎯
Focusing

Yousuf Hossain yousuf-hossain-shanto

🎯
Focusing
View GitHub Profile
@yousuf-hossain-shanto
yousuf-hossain-shanto / position-from-gmap-embed-code.ts
Last active June 21, 2025 06:12
Get position (latitude, longitude) from google map embed code.
import { load } from "cheerio"
export const getPositionFromGoogleMapEmbedCode = (embedCode: string) => {
const $ = load(embedCode)
const iframe = $("iframe");
let position = {
latitude: undefined,
longitude: undefined,
} as {
latitude?: number;
@yousuf-hossain-shanto
yousuf-hossain-shanto / withpersona.ts
Created June 21, 2025 06:06
WithPersona KYC Implementation
import axios, { AxiosError } from "axios";
const $withPersona = axios.create({
baseURL: "https://withpersona.com/api/v1",
});
$withPersona.defaults.headers.common[
"Authorization"
] = `Bearer ${process.env.WITHPERSONA_API_KEY}`;
$withPersona.defaults.headers.common["Persona-Version"] = `2023-01-05`;
$withPersona.defaults.headers.common["Content-Type"] = "application/json";
@yousuf-hossain-shanto
yousuf-hossain-shanto / readme.md
Created January 31, 2025 05:37 — forked from foyzulkarim/readme.md
# Text-to-Speech Pipeline with Kokoro TTS A Python script that converts text into natural-sounding speech using the Kokoro TTS engine. The script processes a transcript file, generates speech segments, and merges them into a single audio file. ## Features: - Reads text from a transcript file - Generates speech segments with customizable voice an…

Text-to-Speech Pipeline with Kokoro TTS

A Python script that converts text into natural-sounding speech using the Kokoro TTS engine. The script processes a transcript file, generates speech segments, and merges them into a single audio file.

Features:

  • Reads text from a transcript file
  • Generates speech segments with customizable voice and speed settings
  • Saves individual audio segments and their corresponding text
  • Merges all audio segments into a single WAV file using FFmpeg
  • Organizes output in timestamped directories
@yousuf-hossain-shanto
yousuf-hossain-shanto / contracts...Bloclance...ICO...PresaleV1_Doc.md
Created October 9, 2024 07:00
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.24+commit.e11b9ed9.js&optimize=true&runs=200&gist=

func: createPresale

Param _price: How much sell tokens can be purchased in 1 USD. In sell tokens decimals. Assuming 18 decimals Ex: 0.02 USD/Token, so 50 tokens/USD. Value: 50000000000000000000

Param _nextStagePrice: Same as _price Ex: 0.025 USD/Token, so 40 tokens/USD. Value: 40000000000000000000

Param _tokensToSell: How much sell tokens you want to sell. In sell tokens decimals. Assuming 18 decimals Ex: 5 million or 5000000. Value: 5000000000000000000000000

@yousuf-hossain-shanto
yousuf-hossain-shanto / contracts...Bloclance...ICO...PresaleV1.sol
Created October 9, 2024 07:00
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.24+commit.e11b9ed9.js&optimize=true&runs=200&gist=
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.24;
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
interface Aggregator {
function latestRoundData()
external
@yousuf-hossain-shanto
yousuf-hossain-shanto / contracts...Bloclance...ICO...BlocICOV3.sol
Created October 8, 2024 05:37
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.24+commit.e11b9ed9.js&optimize=true&runs=200&gist=
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.24;
import "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
/// @custom:security-contact yousuf.hossain.shanto@gmail.com
@yousuf-hossain-shanto
yousuf-hossain-shanto / EscrowHub.sol
Created May 6, 2022 02:21
Escrow Hub Solidity Contract
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.7;
library Counters {
struct Counter {
// This variable should never be directly accessed by users of the library: interactions must be restricted to
// the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add
// this feature: see https://github.com/ethereum/solidity/issues/4637
uint256 _value; // default: 0
@yousuf-hossain-shanto
yousuf-hossain-shanto / .gitlab-ci.yml
Last active April 6, 2022 05:36
Gitlab CI for Laravel Vapor
deploy:
stage: deploy
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
when: never
- if: '$CI_COMMIT_BRANCH == "develop"'
when: always
image: bitnami/laravel
variables:
VAPOR_API_TOKEN: $VAPOR_API_TOKEN
@yousuf-hossain-shanto
yousuf-hossain-shanto / data-grabber.js
Created February 6, 2019 04:54
Dynamic data attribute grabber (Using Jquery)
var datas = [];
[].forEach.call(this.attributes, function(attr) {
if (/^data-/.test(attr.name)) {
var camelCaseName = attr.name.substr(5).replace(/-(.)/g, function ($0, $1) {
return $1.toUpperCase();
});
datas.push({
name: camelCaseName,
value: attr.value
});