This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/bash | |
# Author: @rexagod, et al. | |
# Set -e so that the script exits if any command fails. | |
set -e | |
# This utility: | |
# * takes in a URI, in the format: remote_name:branch, | |
# * adds that remote if it doesn't exist, and finally, | |
# * checks out to that branch. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"context" | |
"os" | |
"time" | |
driver "github.com/chromedp/chromedp" | |
"k8s.io/klog/v2" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"+1": "👍", | |
"-1": "👎", | |
"smiley": "😃", | |
"laughing": "😆", | |
"confused": "😕", | |
"heart": "❤️", | |
"tada": "🎉", | |
"clap": "👏", | |
"sweat_smile": "😅", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Simple JavaScript Inheritance | |
* By John Resig https://johnresig.com/ | |
* MIT Licensed. | |
*/ | |
// Inspired by base2 and Prototype | |
(function(){ | |
var initializing = false, fnTest = /xyz/.test(function(){xyz;}) ? /\b_super\b/ : /.*/; | |
// The base Class implementation (does nothing) | |
this.Class = function(){}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Person = Class.extend({ | |
init: function(isDancing){ | |
this.dancing = isDancing; | |
}, | |
dance: function(){ | |
return this.dancing; | |
} | |
}); | |
var Ninja = Person.extend({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This script is used to bump the version of the whitelisted health checks based on the latest release version, or the current branch. | |
DEFAULT_BRANCH=$(git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@') | |
CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD) | |
if [ "$CURRENT_BRANCH" = "$DEFAULT_BRANCH" ]; then | |
LATEST_RELEASE_BRANCH=$(git ls-remote git@github.com:openshift/console.git |\ | |
awk -F '/' '/\/release-/ {print $3}' |\ | |
sort --version-sort |\ | |
tail -n 1) | |
LATEST_VERSION=$(echo "$LATEST_RELEASE_BRANCH" | sed 's/release-//') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Mappings based on autocommands. | |
" Autocommands can also be chained. | |
" au Filetype javascript nn <buffer> <M-a> :!node %<cr> | |
" <buffer> points to the script the com was declared in | |
" nn <buffer> <leader>l :echom expand('%')<cr> | |
" OPERATOR-PENDING MAPPING | |
" :normal hides the effect of the preceding operator | |
" onoremap in( :<c-u>normal! f(vi(<cr> | |
" onoremap in( :<c-u>normal! f{vi}<cr> | |
" normal does not recognise special symbols like <cr> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" grep! | |
function! s:ToggleQuickFix() | |
if empty(filter(getwininfo(), 'v:val.quickfix')) | |
copen | |
else | |
cclose | |
endif | |
endfunction | |
function! s:Grepper(type) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Resource endpoints | |
declare -A pull | |
pull=( | |
["docker"]='rexagod/f16bc3cde0cdde21b1f20473f701bc07/raw/a3ff4edf6629ed63d4d45f2068807a060e1009ef/docker.bash' | |
["k8s"]='rexagod/a0a8cb19770fee943c91b0abd4ab9a7f/raw/cddb0aa687fe988c15d58a23997e717034f148f4/k8s.bash' | |
["kvm"]='rexagod/53223bd451d372b2299351ffdfd818b0/raw/c45e48697b25d6f689998264ed8aa2034a669110/kvm.bash' | |
) | |
printf "=> %s\n" "${!pull[@]}" | |
echo "Press <Enter> to install all of the above packages." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [[ $EUID -ne 0 ]]; then | |
exit 1 | |
fi | |
set -e | |
egrep '^flags.*(vmx|svm)' /proc/cpuinfo || exit 1 | |
dnf group install --with-optional virtualization | |
systemctl start libvirtd |
NewerOlder