Skip to content

Instantly share code, notes, and snippets.

View ralexrdz's full-sized avatar

Raul Rodriguez ralexrdz

  • Vientos
  • Mexico City
View GitHub Profile
@ralexrdz
ralexrdz / allow-paste.js
Created April 17, 2024 17:24
Allow Paste
(function(){var inputs=document.querySelectorAll('input');for(var i=0;i<inputs.length;i++){inputs[i].setAttribute('onpaste','');}console.log('onpaste attribute set on all input tags');})();
@ralexrdz
ralexrdz / registerGroupRunnerWithCache.md
Created April 8, 2024 17:58
Gitlab Selfhosted Runner with Cache Configured

Have docker installed

https://docs.docker.com/engine/install/ubuntu/

Install gitlab runner

export arch=amd64
curl -LJO "https://gitlab-runner-downloads.s3.amazonaws.com/latest/deb/gitlab-runner_${arch}.deb"
dpkg -i gitlab-runner_${arch}.deb
class Properties {
constructor (tableBuffer) {
this.tableBuffer = tableBuffer;
this.properties = [];
if (tableBuffer === null) return
this.tableHeaderLength = tableBuffer.readInt16LE(8);
this.recordLength = tableBuffer.readInt16LE(10);

check CPU

top -bn1 | grep load | awk '{printf "CPU Load: %.2f\n", $(NF-2)}'

check memory

free -m | awk 'NR==2{printf "Memory Usage: %s/%sMB (%.2f%%)\n", $3,$2,$3*100/$2 }'
curl -L https://git.io/JeNX1 >> ~/.zshrc
source ~/.zshrc
#!/bin/bash
# requires jq and docker
docker inspect $(docker ps -qa) | jq -r 'map([.Name, .GraphDriver.Data.MergedDir]) | .[] | "\(.[0])\t\(.[1])"'
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
accountsservice
acl
acpi
acpi-support
acpid
add-apt-key
adduser
adobe-flashplugin
adwaita-icon-theme
alsa-base

Instalacion de kubectl y configuración de acceso a cluster

Correr en terminal

(no importa en qué directorio, acabará moviendose a PATH)

curl -LO "https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl"
  • Add ^ to show only matches in your browsing history.
  • Add * to show only matches in your bookmarks.
  • Add + to show only matches in bookmarks you've tagged.
  • Add % to show only matches in your currently open tabs.
  • Add # to show only matches where every search term is part of the title or part of a tag.
  • Add $ to show only matches where every search term is part of the web address (URL). The text "https://" or "http://" in the URL is ignored but not "file:///".
  • Add ? to show only search suggestions.