- Service container is where your services are registered.
- Service providers provide services by adding them to the container.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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'] |
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.
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "key": "ctrl+enter", | |
| "command": "workbench.action.terminal.sendSequence", | |
| "args": { | |
| "text":"node simple.js\n", | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 })) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| function colorized($var) | |
| { | |
| return "\e[0;30;42m$var\e[0m"; | |
| } | |
| $firstRowIndex = 3; | |
| $secondRowIndex = 2; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Injectable } from '@nestjs/common'; | |
| import { REDIS_HOST, REDIS_PORT } from '../../config'; | |
| import Redis from 'ioredis'; | |
| import { get } from 'lodash'; | |
| import { Logger } from '../logger/logger'; | |
| import * as Sentry from '@sentry/node'; | |
| @Injectable() | |
| export class RedisService { | |
| private client: Redis.Redis; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>JS + CSS Clock</title> | |
| </head> | |
| <body> | |
| <div class="clock"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # ConvertTo-Jpeg - Converts RAW (and other) image files to the widely-supported JPEG format | |
| # https://github.com/DavidAnson/ConvertTo-Jpeg | |
| Param ( | |
| [Parameter( | |
| Mandatory = $true, | |
| Position = 1, | |
| ValueFromPipeline = $true, | |
| ValueFromPipelineByPropertyName = $true, | |
| ValueFromRemainingArguments = $true, |