Skip to content

Instantly share code, notes, and snippets.

View ahmadrosid's full-sized avatar
🚀
On

ahmadrosid ahmadrosid

🚀
On
View GitHub Profile
@ahmadrosid
ahmadrosid / download.py
Created October 14, 2022 07:57
Transribe youtube video using vosk.
import re
import yt_dlp
def download_wav(url):
ydl_opts={}
with yt_dlp.YoutubeDL(ydl_opts) as ydl:
info_dict = ydl.extract_info(url, download=False)
video_title = info_dict['title']
TODAY’S PICKS
- https://media.wired.com/photos/637c22edc16b4f8de1df58cc/16:9/pass/Filmmakers-Can-Tweak-Your-TV-Settings-in-More-Ways-Than-Ever-Gear-GettyImages-1385473818.jpg
CHANNEL CHANGER
Filmmakers Can Tweak Your TV Settings in More Ways Than Ever
BOONE ASHWORTH
- https://media.wired.com/photos/627bfd36a4fb038463303e27/16:9/pass/Sony-WH-1000MX5-Gear.jpg
LISTEN UP
The 18 Best Wireless Headphones for Everyone
version: '3.3'
services:
blog:
image: ghost:4
restart: always
ports:
- 8080:2368
volumes:
- ~/data/content:/var/lib/ghost/content
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ahmadrosid
ahmadrosid / dark-nord.js
Created January 22, 2023 21:01
Custom theme for react-syntax-highlighter package.
import { nord as base } from "react-syntax-highlighter/dist/esm/styles/prism";
/** @type { React.CSSProperties } */
let baseBg = {
borderRadius: "0",
margin: "0",
background: "transparent",
overflow: "hidden",
textAlign: "left",
whiteSpace: "pre",
{
100: '#F0F3FF',
300: '#7D8398',
400: '#565868',
500: '#444753',
600: '#40414E',
700: '#343540',
800: '#202123',
}
@ahmadrosid
ahmadrosid / Markdown.js
Last active January 22, 2023 21:07
Markdown component using react-syntax-highlighter. Get the theme here: https://gist.github.com/ahmadrosid/9d1829132492a3763e77ec3019311e2b
import { Clipboard } from "lucide-react";
import { useState } from "react";
import ReactMarkdown from "react-markdown";
import { Prism as SyntaxHighlighter } from "react-syntax-highlighter";
import dark from "../theme/dark";
export default function Markdown({ markdown }) {
return (
<ReactMarkdown
children={markdown}
@ahmadrosid
ahmadrosid / loading.html
Created January 23, 2023 07:51
Loading spinner tailwindcss.
<div className="max-w-3xl mx-auto px-2 py-4">
<button type="button" className="inline-flex items-center px-4 py-2 leading-6 text-sm text-gpt-100 transition ease-in-out duration-150" disabled="">
<svg className="animate-spin -ml-1 mr-3 h-5 w-5 text-white" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
<circle className="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" strokeWidth="4"></circle>
<path className="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path>
</svg>
Loading...
</button>
</div>
<div class="d-flex flex-column flex-shrink-0 p-3 text-bg-dark" style="width: 280px;">
<a href="/" class="d-flex align-items-center mb-3 mb-md-0 me-md-auto text-white text-decoration-none">
<svg class="bi pe-none me-2" width="40" height="32"><use xlink:href="#bootstrap"></use></svg>
<span class="fs-4">Sidebar</span>
</a>
<hr>
<ul class="nav nav-pills flex-column mb-auto">
<li class="nav-item">
<a href="#" class="nav-link active" aria-current="page">
<svg class="bi pe-none me-2" width="16" height="16"><use xlink:href="#home"></use></svg>