Skip to content

Instantly share code, notes, and snippets.

View ressl's full-sized avatar

Robert Ressl ressl

View GitHub Profile
@ressl
ressl / gitlab_retry_ci.md
Last active July 13, 2018 10:54
GitLab retry all failed jobs

#First assign a user to user variable user = User.find_by(username: 'your username here')

Find all failed jobs for the project with the id 62

job = Ci::Build.find_by_sql("select * from ci_builds where status = 'failed' and project_id = '62'")

job.each { |j| Ci::Build.retry(j, user) }

@ressl
ressl / read_hyper-v_hostname_from_guest.md
Last active July 13, 2018 10:56
Read Hyper-V hostname from guest

Read Hyper-V hostname from guest

To read the hyper-v host from the guest linux os:

ruby

IO.binread('/var/lib/hyperv/.kvp_pool_3')[/\HostName(.*?)HostingSystemEditionId/, 1].scan(/[[:print:]]/).join

bash

@ressl
ressl / iterm2.md
Created July 13, 2018 10:53 — forked from squarism/iterm2.md
iterm2 cheatsheet

Tabs and Windows

Function Shortcut
Fullscreen + Enter
Previous Tab + Left Arrow
Next Tab + Right Arrow
Go to Tab + Number
Go to Window + Option + Number
Go to Split Pane by Direction + Option + Arrow
@ressl
ressl / gist:a8b6e34310911d305873b1ab9503d676
Created November 25, 2018 13:08 — forked from CristinaSolana/gist:1885435
Keeping a fork up to date

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@ressl
ressl / gist:03ae49a3748c16847326662e062507f9
Created November 25, 2018 19:40 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@ressl
ressl / git_clean.sh
Last active November 27, 2018 21:01
Cleanup git repo and resign commits
# test before
git log -S'password' -p
# create a password list
echo 'example_password' > passwords.txt
# https://rtyley.github.io/bfg-repo-cleaner/
# replace text
java -jar bfg.jar --replace-text passwords.txt git_project
@ressl
ressl / keybase.md
Last active January 14, 2021 16:38

Keybase proof

I hereby claim:

  • I am ressl on github.
  • I am rressl (https://keybase.io/rressl) on keybase.
  • I have a public key ASAI_AuetlYYEnfHI-wEXDLg6jShxX01XzW6SHr3Ukinego

To claim this, I am signing this object:

[kubernetes]
name=Kubernetes
baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
@ressl
ressl / nginx
Created December 17, 2019 10:26
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx
labels:
app: nginx
spec:
replicas: 2
selector:
matchLabels:
apiVersion: v1
kind: Pod
metadata:
name: busybox
spec:
containers:
- name: busybox
image: radial/busyboxplus:curl
args:
- sleep