Skip to content

Instantly share code, notes, and snippets.

View vyspiansky's full-sized avatar

Ihor Vyspiansky vyspiansky

View GitHub Profile
@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'
@vyspiansky
vyspiansky / jest-test-commands.md
Last active February 8, 2023 08:26
Jest commands

Jest commands

Run specific test

jest --config=../../jest.config.js --colors src/path/to/file.test.ts
@vyspiansky
vyspiansky / minikube-hyperkit-snippets.md
Created February 1, 2023 09:50
Minikube + Hyperkit snippets

minikube start --kubernetes-version=v1.22.3 --driver=hyperkit --container-runtime=docker --nfs-share="/path/tp/project/folder" --nfs-shares-root="/"


minikube logs minikube profile list


minikube kubectl get nodes

@vyspiansky
vyspiansky / nmap-port-scanning.md
Created February 1, 2023 09:44
Port scanning nmap utility

nmap - Port scanning utility for large networks

Install on macOS:

brew install nmap

To see ports being listened to:

@vyspiansky
vyspiansky / docker-compose.md
Created February 1, 2023 09:41
Docker compose

Docker compose

Up a certain container only

docker-compose up -d <NAME>
docker-compose logs

Note: Just drop the -d flag if you want to see the logs echoed to stdout.

@vyspiansky
vyspiansky / cherry-pick.md
Created February 1, 2023 09:37
Cherry-pick

Cherry-pick

  1. Get commit hash 103fe73
  2. Create branch from a specific version (tag) and name it like forward-merge-<YOUR_BRANCH>
  3. Run git cherry-pick 103fe73
  4. Resolve conflicts if needed
@vyspiansky
vyspiansky / vs-code-snippets.md
Created January 31, 2023 21:59
Visual Studio Code snippets

How to compare 2 files

code -d left.txt right.txt

Note: where in your ~/.bash_profile file

code () { VSCODE_CWD="$PWD" open -n -b "com.microsoft.VSCode" --args $* ;}