kubectl run debug --rm -i --tty --restart=Never --image=alpine --namespace=default -- /bin/sh |
You are working on a Rails app that uses a gem named abc
. This gem is hosted on RubyGems and the source code of the gem is available at https://github.com/your-username/abc.
You created a new branch locally for your gem (new-feature
). You wanted to modify the gem and load it directly to your local Rails app. And, you don't want to push the gem changes to GitHub and publish the gem to RubyGems just yet.
You want all the changes that you made in your local gem directory get reflected immediately in your local Rails app without requiring you to run gem build
and gem install
command in the gem's local directory.
<!-- | |
* File: app/views/shared/_flash.html.erb | |
* Note: the `html_safe` is important here | |
--> | |
<% flash.each do |type, msg| %> | |
<div class="alert alert-info"> | |
<%= msg.html_safe %> | |
</div> | |
<% end %> |
package main | |
import ( | |
"fmt" | |
"github.com/stratoberry/go-gpsd" | |
"time" | |
) | |
func main() { | |
var gps *gpsd.Session |
When using Homebrew Tap, it's quite hard to install an older or specific version of Homebrew package.
It took me awhile to run some tests before I found the solution (see below).
If you are facing the same problem, you can use my script below to solve the problem.
# Step 1: see the status of VMs
$ multipass ls
Name State IPv4 Image
vm1 Stopped -- Ubuntu 20.04 LTS <-- this one is OK, stopped in previous command
vm2 Starting -- Ubuntu 20.04 LTS <-- this one is not OK, why it's stuck?
# Step 2: apply the fix
If you are using iTerm2 on Mac OSX and trying to have pbcopy
experience when using Linux server (over SSH), try this remote-pbcopy-iterm2 tool.
$ kubectl get pods
NAME READY STATUS RESTARTS AGE
virt-launcher-vm-4sd8h 1/1 Running 0 2d13h
$ kubectl exec -it virt-launcher-vm-4sd8h -- bash
bash-5.0# virsh list
Id Name State
Regex to find WIP Golang function comments (e.g. // FunctionName ...
) in VS Code
(\/\/ [a-zA-Z]* \.{3})