Skip to content

Instantly share code, notes, and snippets.

View nirgeier's full-sized avatar

Nir Geier nirgeier

  • CodeWizard
  • Israel
  • 06:23 (UTC +03:00)
View GitHub Profile
Acai
Aceola
Alfalfa Sprouts
Apple
Apricot
Apricots
Artichoke
Asian Pear
Asparagus
Atemoya
@nirgeier
nirgeier / sample_replacement.sh
Created October 25, 2022 09:43
Replace text (ex: server url) in AzureDevOps comments
##
## Global variables
##
# The string which we wish to replace
STR_TO_REPLACE="STR_TO_REPLACE"
# The new value
STR_REPLACMENT="New Server URL"
@nirgeier
nirgeier / main.yaml
Created November 27, 2023 21:02 — forked from kbariotis/main.yaml
Ansible playbook for deploying a Node.js app to DigitalOcean
- name: DO
hosts: localhost
vars:
project_name: "PUT A NAME FOR YOUR PROJECT HERE"
do_token: "PUT YOUR DIGITAL OCEAN API KEY HERE ==> https://cloud.digitalocean.com/settings/api/tokens"
repository: "PUT YOUR REPOSITORY URL HERE"
tasks:
- name: LOCAL | Generate SSH key
shell: ssh-keygen -b 2048 -t rsa -f ~/.ssh/{{project_name}} -q -N ""

Docker on Lima (lima-vm/lima) Setup Guide

In recent months, Lima has become de facto standard software as a free and open source alternative to Docker Desktop for Mac. Several projects (such as Colima, Rancher Desktop, or Finch) for similar purpose also uses Lima as their backend. These projects will make it easier to set up Lima. But some people may not want to introduce extra components other than Lima. This guide will show you how to set up Lima to be alternative to Docker Desktop for Mac, while using Lima only.

🪣 Note. It is a good practice to uninstall Docker Desktop for Mac before proceeding with the following steps.

1. Install Lima and Docker CLI

@nirgeier
nirgeier / vim.MD
Last active March 22, 2024 09:04
Vim Useful shortcuts

Vim Useful shortcuts

Delete all content of the file (empty file)

ESC + gg + dG

So, how does this dG command works?

  • gg - Jump to the first line of the file
  • dg - d is for the cut action and G is for moving the cursor to the end of the file.
  • This way, dG cuts all the text from the current cursor position to the end of the file.
@nirgeier
nirgeier / limactl_fix_docker.sh
Last active April 7, 2024 20:44
Fixing limactl mount on MacOs
# Place the file under ~/.lima/_config/override.yaml
cat << EOF > ~/.lima/_config/override.yaml
---
mounts:
- location: "/tmp"
writable: true
- location: "~/"
writable: true
EOF