Skip to content

Instantly share code, notes, and snippets.

View ahmadrosid's full-sized avatar
🚀
On

ahmadrosid ahmadrosid

🚀
On
View GitHub Profile
@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",
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
version: '3.3'
services:
blog:
image: ghost:4
restart: always
ports:
- 8080:2368
volumes:
- ~/data/content:/var/lib/ghost/content
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
@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']
@ahmadrosid
ahmadrosid / laravel-interview.md
Created September 22, 2022 12:39
Laravel Interview Question

What is the difference between service provider and service container?

  • Service container is where your services are registered.
  • Service providers provide services by adding them to the container.
@ahmadrosid
ahmadrosid / go-interview.md
Last active September 22, 2022 06:55
Golang interview question?

What is goroutine?

A goroutine is a lightweight thread managed by the Go runtime.

What is channel?

Channels are a typed conduit through which you can send and receive values.

What is Buffered Channels?

@ahmadrosid
ahmadrosid / docker_interview_question.md
Created September 15, 2022 15:49 — forked from bansalankit92/docker_interview_question.md
Docker interview questions and answers all level

What is Hypervisor?

A hypervisor is a software that makes virtualization possible. It is also called Virtual Machine Monitor. It divides the host system and allocates the resources to each divided virtual environment. You can basically have multiple OS on a single host system. There are two types of Hypervisors:

  • Type 1: It’s also called Native Hypervisor or Bare metal Hypervisor. It runs directly on the underlying host system. It has direct access to your host’s system hardware and hence does not require a base server operating system.
  • Type 2: This kind of hypervisor makes use of the underlying host operating system. It’s also called Hosted Hypervisor.

What is virtualization?

Virtualization is the process of creating a software-based, virtual version of something(compute storage, servers, application, etc.). These virtual versions or environments are created from a single physical hardware system. Virtualization lets you split one system into many different sections which act like separ

{
"key": "ctrl+enter",
"command": "workbench.action.terminal.sendSequence",
"args": {
"text":"node simple.js\n",
}
}
@ahmadrosid
ahmadrosid / [slug].js
Created October 27, 2021 13:59 — forked from agungjk/[slug].js
Crawler example on Vercel using Puppeteer and NextJS API routes
const puppeteer = require('puppeteer-core');
const cheerio = require('cheerio');
const chrome = require('chrome-aws-lambda');
export default async (req, res) => {
const slug = req?.query?.slug;
if (!slug) {
res.statusCode = 200
res.setHeader('Content-Type', 'application/json')
res.end(JSON.stringify({ id: null }))