Skip to content

Instantly share code, notes, and snippets.

View sefatanam's full-sized avatar
:octocat:
odistro

Sefat Anam sefatanam

:octocat:
odistro
View GitHub Profile
FROM node:alpine as builder
WORKDIR /app
COPY package.json package-lock.json ./
ENV CI=1
RUN npm ci
COPY . .
RUN npm run build -- --prod --output-path=/dist

Comparison of ASP.NET and Node.js for Backend Programming

We will compare ASP.NET and Node.js for backend programming.
Source codes from examples.

Updates

This document was published on 21.09.2015 for a freelance employer. Some changes since then (14.02.2016):

  1. Koa.js no longer uses co-routines, it has switched to Babel's async/await. yield and await are used almost in the same way, so I see no point to rewrite the examples.
const path = require('path');
const TerserPLugin = require('terser-webpack-plugin');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const CleanWebpackPlugin = require('clean-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin')
module.exports = {
entry: './src/index.js',
output: {
filename: 'bundle.[contenthash].js',
path: path.resolve(__dirname, './dist'),
@sefatanam
sefatanam / README.md
Created July 10, 2021 23:07 — forked from astamicu/Remove videos from Youtube Watch Later playlist.md
Script to remove all videos from Youtube Watch Later playlist

UPDATED 3.12.2020

The old version of youtube with "disable_polymer" is not working anymore, so the script also stopped working.

Thanks to JanTheDeveloper we have a new working script. Big up!

I just changed the '//span[contains(text(),"Watch later")]', to '//span[contains(text(),"Remove from")]', and it should work for any playlist, not just the watch later one. (thanks to hudsonite for the tip)

setInterval(function () {
 document.querySelector('#primary button[aria-label="Action menu"]').click();
@sefatanam
sefatanam / README.md
Last active October 23, 2021 15:28
Reclaim Disk Space by Compacting Your Docker Desktop

Reclaim Disk Space by Compacting Your Docker Desktop

After using docker desktop for quite long time it take disk space up to 50 GB or more for it's cache objects, images & junkey files. To Reclaim disk space there are some few steps to follow :

  • Step 1

# Before cleaning docker cache object see your existing docker system details

>> docker system info
@sefatanam
sefatanam / sample.component.html
Created July 29, 2021 21:41 — forked from muhammadawaisshaikh/sample.component.html
Creating a Dark & Light Toggle Mode on your Angular App
<div class="text-right">
<div class="custom-control custom-switch">
<mat-checkbox type="checkbox"
class="custom-control-input"
id="darkMode"
[checked]="isThemeDark | async"
(change)="toggleDarkTheme($event)">
<label class="custom-control-label" for="darkMode"></label>
<a class="text-capitalize">Dark Mode</a>
</mat-checkbox>

Some of the Redis best practices content has moved

This content from this markdown file has moved a new, happier home where it can serve more people. Please check it out : https://docs.microsoft.com/azure/azure-cache-for-redis/cache-best-practices.

NOTE: Client specific guidance listed below is still valid and should still be considered. I will update this document once all content has been moved.

using System.Collections.Generic;
using System.Threading.Tasks;
using Azure.Storage.Blobs;
using Azure.Storage.Blobs.Models;
using Microsoft.AspNetCore.Http;
namespace azblob.Services
{
public class BlobService : IBlobService
{
using System.IO;
using System;
using System.Threading.Tasks;
using azblob.Services;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
namespace azblob.Controllers
{
public class BlobFilesController : Controller