This file contains hidden or 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
| ### FIRST RKE2 SERVER NODE (CONTROL PLANE NODES) | |
| ### Set Variables | |
| export DOMAIN= | |
| export TOKEN= | |
| export vRKE2= | |
| export Registry= | |
| export RegistryUsername= | |
| export RegistryPassword= | |
| ### Apply System Settings |
This file contains hidden or 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
| --- RKE2 SERVER NODES (CONTROL PLANE) --- | |
| ### Setup RKE2 Server | |
| mkdir -p /opt/rke2-artifacts/ /etc/rancher/rke2/ /var/lib/rancher/rke2/server/manifests/ | |
| useradd -r -c "etcd user" -s /sbin/nologin -M etcd -U | |
| ### Configure RKE2 Config | |
| cat << EOF >> /etc/rancher/rke2/config.yaml | |
| profile: cis | |
| selinux: true | |
| secrets-encryption: true |
This file contains hidden or 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 | |
| # Jenkins Configuraitons Directory | |
| cd $JENKINS_HOME | |
| # Add general configurations, job configurations, and user content | |
| git add -- *.xml jobs/*/*.xml userContent/* ansible/* | |
| # only add user configurations if they exist | |
| if [ -d users ]; then | |
| user_configs=`ls users/*/config.xml` |
This file contains hidden or 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
| inoremap <silent> <Bar> <Bar><Esc>:call <SID>align()<CR>a | |
| function! s:align() | |
| let p = '^\s*|\s.*\s|\s*$' | |
| if exists(':Tabularize') && getline('.') =~# '^\s*|' && (getline(line('.')-1) =~# p || getline(line('.')+1) =~# p) | |
| let column = strlen(substitute(getline('.')[0:col('.')],'[^|]','','g')) | |
| let position = strlen(matchstr(getline('.')[0:col('.')],'.*|\s*\zs.*')) | |
| Tabularize/|/l1 | |
| normal! 0 | |
| call search(repeat('[^|]*|',column).'\s\{-\}'.repeat('.',position),'ce',line('.')) |
This file contains hidden or 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/env ruby | |
| # organize-av-files - Organizes files playable by mplayer | |
| # into 'saves', 'deletes', and 'undecideds' subdirectories. | |
| # | |
| # stored at: | |
| # https://gist.github.com/keithrbennett/4d9953e66ea35e2c52abae52650ebb1b | |
| require 'date' |
This file contains hidden or 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
| # EasyColors | |
| if [ ${libout_color:-1} -eq 1 ]; then | |
| DEF_COLOR="\x1b[0m" | |
| BLUE="\x1b[34;01m" | |
| CYAN="\x1b[36;01m" | |
| GREEN="\x1b[32;01m" | |
| RED="\x1b[31;01m" | |
| GRAY="\x1b[37;01m" | |
| YELLOW="\x1b[33;01m" | |
| fi |
This file contains hidden or 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
| require 'sequel' | |
| DB = Sequel.connect(:adapter=>'odbc',:driver=>'SQL Server Native Client 10.0',:server=>'localhost',:port=>1433, :uid=>'myuser',:pwd=>'mypass',:db_type=>'mssql') | |
| DB.fetch("SELECT * FROM artist") do |row| | |
| puts row | |
| end |
This file contains hidden or 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
| require 'sequel' | |
| DB = Sequel.connect(:adapter=>'odbc',:driver=>'SQL Server Native Client 10.0',:server=>'localhost',:port=>1433, :uid=>'myuser',:pwd=>'mypass',:db_type=>'mssql') | |
| DB.fetch("SELECT * FROM artist") do |row| | |
| puts row | |
| end |
This file contains hidden or 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 | |
| if [ "$#" -ne 2 ] ; then | |
| echo 'Usage: mount-nbd.sh <device> <mount_point>' | |
| exit 1 | |
| fi | |
| device=$1 | |
| fs_type=$(blkid -o value -s TYPE $device) | |
| if [[ -z $fs_type ]] ; then |
NewerOlder