Skip to content

Instantly share code, notes, and snippets.

View ahmadrosid's full-sized avatar
🚀
On

ahmadrosid ahmadrosid

🚀
On
View GitHub Profile
@ahmadrosid
ahmadrosid / example-json-schema.json
Created May 3, 2021 13:50
Example listing json schema
{
"version": "2.0.0",
"deprecatedDate": "Not defined",
"schemaDefinition": {
"type": "object",
"keys": {
"list_type": {
"type": "string",
"flags": {
"empty": {
# 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,
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>JS + CSS Clock</title>
</head>
<body>
<div class="clock">
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;
<?php
function colorized($var)
{
return "\e[0;30;42m$var\e[0m";
}
$firstRowIndex = 3;
$secondRowIndex = 2;
@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 }))
{
"key": "ctrl+enter",
"command": "workbench.action.terminal.sendSequence",
"args": {
"text":"node simple.js\n",
}
}
@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

@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 / 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.