Category: Uncategorized

  • SSH Server Port Update

    Edit /etc/ssh/sshd_config

  • NvChad

    Space-e Open NvimTree Ctrl-n Toggle NvimTree Space-fa:Telescope fd Telescope: Find files Ctrl-(w)h / (w)j / (w)k / (w)n Move between pane Ctrl-wq Close pane Tab:bn Next buffer Shift-Tab:bp Previous buffer Ctrl-v Open file in vertical split (NvimTree) Ctrl-x Open file in horizontal split (NvimTree) Ctrl-t Open file in tab (NvimTree) Space-x:bd Close tab (buffer) g?…

  • Bitbucket Pipelines SSH Keys

    When you paste you SSH key, make sure you press an Enter after —–END OPENSSH PRIVATE KEY—–

  • Vim: Search and Replace

    Substitute first occurrence in the cursor line: Substitute all occurrence in the cursor line: Substitute first occurrence in the whole file: Substitute all occurrence in the whole file: Repeat the last command: ranges .s or s = substitute on the cursor line %s = substitute on the whole file 1s = substitute on line 1…

  • Wireguard

    Installation: Generate public key and private key on server and peer: Server Peer AllowedIPs will route traffic to IP/network via this peer

  • Composer with Bitbucket Private Repository

    Create a Composer project and push it to your repo: Create Bitbucket OAuth Consumer here. This command will generate ./auth.json file. Use –global flag to generate ~/.composer/auth.json file. Add the private repository to ./composer.json. Use –global flag to generate ~/.composer/config.json file. Install the package from the private repository. We use dev-* prefix to checkout a…

  • Docker: ENTRYPOINT vs. CMD

    ENTRYPOINT is the process run when the container starts (PID 1). CMD is the argument for the entrypoint. When you run the container without arguments, this will execute ENTRYPOINT + CMD: When you run the container with arguments, this will execute ENTRYPOINT + arguments: When you want to override the entrypoint use the –entrypoint flag:

  • MySQL: Permissions

    Create a user: Rename a user: Grant all: Grant all to a database starts with “test_”: From MySQL website: The _ and % wildcards are permitted when specifying database names in GRANT statements that grant privileges at the database level (GRANT … ON db_name.*). This means, for example, that to use a _ character as part of a database name, specify it using the \ escape…

  • Kubernetes: Pulling Image From Private Registry

    Create the Secret for you docker registry: To double check: Create a test pod: For pod, setting the imagePullSecrets only available using the –overrides flag when you create the pod. After the pod is created, you cannot edit the imagePullSecrets using kubectl edit or patch. DEPLOYMENT You can edit the deployment manifest and add the…

  • Git: References

    Git references located in .git/refs folder .git/refs/heads is the position of commit based on branch (HEAD) in the local repository .git/refs/remotes/<remote-name> is the position of commit based on branch (HEAD) in the remote repository .git/refs/tags is the position of commit based on tag in the local repository Push commit to new remote branch Since this…