Skip to content

Instantly share code, notes, and snippets.

View arrase's full-sized avatar
🏠
Working from home

Juan Ezquerro LLanes arrase

🏠
Working from home
View GitHub Profile
@arrase
arrase / git-pushing-multiple.rst
Created April 15, 2020 13:40 — forked from rvl/git-pushing-multiple.rst
How to push to multiple git remotes at once. Useful if you keep mirrors of your repo.

Pushing to Multiple Git Repos

If a project has to have multiple git repos (e.g. Bitbucket and Github) then it's better that they remain in sync.

Usually this would involve pushing each branch to each repo in turn, but actually Git allows pushing to multiple repos in one go.

If in doubt about what git is doing when you run these commands, just

@arrase
arrase / gist:c3fccb12d217188d00ac743bc72f9c8a
Created January 17, 2022 18:03
Openbox: resize windows
In the <keyboard> section in your ~/.config/openbox/lxqt-rc.xml file, add:
<keybind key="A-Left">
<action name="UnmaximizeFull"/>
<action name="MoveResizeTo">
<width>50%</width>
<height>100%</height>
<x>0%</x>
<y>0%</y>
</action>
@arrase
arrase / .gcloud-ps1.sh
Last active December 5, 2023 16:38
Simple gcloud prompt for zsh
#!/usr/bin/env bash
# Copyright 2023 Juan Ezquerro LLanes
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
@arrase
arrase / add-bin.sh
Last active February 16, 2024 09:02
Upload busybox binaries to kubernetes pods
#!/bin/bash
help(){
echo
echo "Usage:"
echo "add-bin.sh <bin_name> <pod> <dest_path>"
echo
echo "Example:"
echo "add-bin.sh vi my-pod-5df5467c97-fqbzw /mnt/disk"
echo
@arrase
arrase / kubectl-ubuntufs
Created February 16, 2024 09:01
Run pod and mount volume from command line
#!/bin/bash
PVC=$(kubectl get pvc -o jsonpath="{.items[0].metadata.name}" 2> /dev/null)
[ -z "$PVC" ] && echo "No encuentro ninguna PVC en este namespace" && exit 1
kubectl run ubuntu --image ubuntu --rm -ti --restart=Never --overrides="
{
\"spec\": {
\"containers\": [