Skip to content

Instantly share code, notes, and snippets.

View hsn0x's full-sized avatar
⌨️
TYPING ...

hsn0x

⌨️
TYPING ...
View GitHub Profile
@hsn0x
hsn0x / docker-commands.md
Last active February 8, 2023 03:14
Docker commands

List of all Docker commands

Created by @hsn0x

Build docker image

docker build -t <image_name> .

Run docker image

@hsn0x
hsn0x / Password Special Characters.md
Created August 5, 2022 10:54
Password Special Characters
@hsn0x
hsn0x / Git basics: Help my case-sensitive filename changes don't commit.md
Created July 16, 2022 17:36
Git basics: Help my case-sensitive filename changes don't commit

We have a file called timezone.js, and we commit this file to Git. All good and well.

File added to Git

But then we realized the whole repo used "time zone" with a space.

Apparently, there are three correct spellings of timezone: timezone, time zone, and time-zone.

With this in mind, we might want to uniform our file system and rename this file to timeZone.js. Let's go ahead and make that change.

@hsn0x
hsn0x / How to speed up Sequelize with complicated includes.md
Last active July 16, 2022 11:47
How to speed up Sequelize with complicated includes

How to speed up Sequelize with complicated includes

Sometimes queries can get complicated with many include statements. This can significantly slow down the response.

const stageWithMeta = await db.stage.findOne({
      where: { id },
      include: [
 {
@hsn0x
hsn0x / Business_Category_List.php
Created July 6, 2022 16:47 — forked from willyarisky/Business_Category_List.php
Array Business Category List
<?php
$categories = array(
"Tunisian Restaurant",
"Hypnotherapy Service",
"Armenian Restaurant",
"Chamber of Commerce",
"District Government Office",
"Millwork Shop",
"Time and Temperature Announcement Service",
"Dock Builder",