Skip to content

Instantly share code, notes, and snippets.

View w3dg's full-sized avatar
:fishsticks:

Debopam Gupta w3dg

:fishsticks:
View GitHub Profile
@w3dg
w3dg / create-express-starter.sh
Created April 5, 2022 10:13
Bash Script for quicky setting up a express-api. From https://github.com/w3dg/express-api-starter
#! /usr/bin/env bash
set -euo pipefail
FOLDER_NAME=$@
echo "Cloning starter..."
echo ""
git clone https://github.com/w3dg/express-api-starter.git ${FOLDER_NAME:=express-api-starter} &> /dev/null
// loading lines: "https://gist.github.com/fourjr/f94fc112cef6da07fc274216d5755420"
const newMember = "NEW_MEMBER";
const welcomeMessages = [
`${newMember} joined the party.`,
`${newMember} is here.`,
`Welcome, ${newMember}. We hope you brought pizza.`,
`A wild ${newMember} appeared.`,
`${newMember} just landed.`,
@w3dg
w3dg / robot-and-batteries.md
Created April 3, 2022 16:41 — forked from w3cj/robot-and-batteries.md
Brain Teaser Warm-Up

Problem

A robotic technology startup is located in San Francisco. The CEO has 3000 battery packs that he wants to transport with Danny (the robotic bird) to his other branch, across a 1000-kilometer stretch of land. The owner has only one robotic bird, which carries a maximum of 1000 battery packs at any moment in time, and consumes one battery pack every kilometer it travels.

Question

What is the largest number of battery packs that can be delivered to the branch?

# https://docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally
├── @antfu/ni@0.13.2
├── @vue/cli@4.5.6
├── ascii-cats@1.1.1
├── bhailang@0.1.0
├── create-node-cli@1.6.0
├── create-react-app@4.0.3
├── esm@3.2.25
@w3dg
w3dg / git-gpg-sign.txt
Created January 1, 2022 04:29 — forked from tuxfight3r/git-gpg-sign.txt
signing git commits with GPG keys.
# generate a key if you don't have one already
gpg --full-gen-key
# list the keys in long format and copy the key id after sec rsa4096/<KEY>
gpg --list-secret-keys --keyid-format LONG
# export the public key and post into your git profile (ui)
gpg --armor --export 127CAA89CEA6BE66
@w3dg
w3dg / hostnames.md
Created December 8, 2021 12:34
List of hostnames for servers/networks/computers in general

Hostnames!

You have to set up a bunch of machines, and suddenly have a mental block as to what to call them all?

Well, here's some good hostnames to get you going.

The idea is to come up with some kind of category, so that people have something to remember all the names by. Some categories: Geographical (countries, cities, parks, rivers, lakes, streets), entertainment (flintsones, simpsons, disney films, celebrities), companies (hotels, airports, local shops, restarants), astronomy (planets, comets, space missions), literature (mythology, philosophers, writers of particular generes, languages), political (presidents, judges, congressmen, terminology), science (units of measure, anatomy, instruments, scientists), industry (tools, machines, inventions, inventors), computers (terminology, programming languages, number systems).

Some hostnames I've seen, used, or expect to use..
(Not responsible for typos; do your own spell checks!)

@w3dg
w3dg / scoop_software.txt
Last active March 28, 2022 18:42
My list of apps installed with scoop ( scoop.sh) on windows
Name Version Source
---- ------- ------
7zip 21.07 main
bat 0.20.0 main
cacert 2022-02-01 main
cowsay 0.2013.07.19 main
dog 0.1.0 main
exiftool 12.40 main
fd 8.3.2 main
figlet 1.0-go main

Live Boot / Install Ubuntu 20.04 LTS

Debopam Gupta | November 6th , 2021

First things first

  1. Get Ubuntu LTS ISO https://ubuntu.com/#download
  2. Get a USB stick ( at least 4 GB ) Warning: Make sure you dont care about the files on the USB as it willl be formatted completely, any data on there will be lost
  3. Download Rufus https://rufus.ie/en/# Github Link : https://github.com/pbatard/rufus
  4. Flash the ISO onto the USB with Rufus. Keep all defaults - MBR, UEFI/BIOS etc
import sys
# sys.stdout.reconfigure(encoding='utf-8') # terminal not complain abt emojis
sys.stdout = open("hbdr.txt", 'w', encoding='utf-8') # redirect the output to a file rather than stdout
text="Happy Birthday! 😀🎉✨🍰🎂 \n"
text.encode('utf-8') # encode the given text in utf8 to support emojis
print(text*1000) # Just spam, its an occasion anyways