Skip to content

Instantly share code, notes, and snippets.

View vyspiansky's full-sized avatar

Ihor Vyspiansky vyspiansky

View GitHub Profile
@vyspiansky
vyspiansky / nodejs_start_new_project.md
Last active November 21, 2023 08:40
Start new Node.js project

How to start a new Node.js project:

npx license mit > LICENSE
npx gitignore node
npx covgen YOUR_EMAIL_ADDRESS
npm init -y

Source

@vyspiansky
vyspiansky / terminal_commands.md
Last active November 21, 2023 08:40
Terminal: useful commands

Some Terminal commands

Current user info

whoami

Give me your IP

@vyspiansky
vyspiansky / docker-commands.md
Created February 1, 2023 10:36
Docker commands

Docker

Run command inside container

Run arbitrary commands inside an existing container:

docker ps
docker exec -it <mycontainer> bash
@vyspiansky
vyspiansky / dandified-yum-snippets.md
Created February 1, 2023 10:33
DNF (Dandified YUM) snippets

DNF (Dandified YUM)

To generate a list of installed packages

sudo dnf list installed | cat -n

Suppose you want to see all packages that start with x

@vyspiansky
vyspiansky / postgresql-commands.md
Created February 1, 2023 10:29
PostgreSQL commands

PostgreSQL commands

Install psql

i)

dnf install postgresql-server
@vyspiansky
vyspiansky / typescript-snippets.md
Created February 1, 2023 10:19
TypeScript snippets

TypeScript snippets

Ignore error

// @ts-expect-error
@vyspiansky
vyspiansky / ubuntu-commands.md
Created February 1, 2023 10:16
Ubuntu specific commands

Ubuntu commands

Restart Apache

sudo service apache2 restart

Search string inside files

@vyspiansky
vyspiansky / ngrok-snippets.md
Created February 1, 2023 10:14
ngrok snippets (draft)

ngrok

Install on macOS

brew install --cask ngrok

Tunneling

@vyspiansky
vyspiansky / apache-snippets.md
Created February 1, 2023 10:10
Apache snippets

Apache

Restart Apache on Ubuntu

sudo service apache2 restart

Config file

@vyspiansky
vyspiansky / find-php-ini-file.md
Last active February 5, 2023 21:13
Find PHP ini file

How to find the PHP ini file from the command line

php -i | grep 'Configuration File'