Skip to content

Instantly share code, notes, and snippets.

View boardstretcher's full-sized avatar

boardstretcher boardstretcher

  • Black Mesa Research
  • Detroit, Mi
View GitHub Profile
@boardstretcher
boardstretcher / gogowindows.txt
Created June 16, 2022 18:13
debloat windows and installed apps
# DEBLOAT WINDOWS
https://github.com/asheroto/winget-installer
https://github.com/gbabichev/Windows10-11-Bloatware-Removal
https://github.com/n1snt/Windows-Decrapifier
# INSTALLED APPS
@boardstretcher
boardstretcher / .user.js
Created April 30, 2022 21:15
Get youtube info
const getYoutubeData = () => {
const videoElem = document.querySelector('ytd-watch-flexy.ytd-page-manager');
const titleElem = document.querySelector('title');
const video = videoElem?.getAttribute?.('video-id') ?? '';
const videoString = `Video=${video}`;
const title = titleElem?.innerText ?? '';
const titleFormatted = title?.trim?.()?.replace?.(' - YouTube', '').replace?.(/ /g, '_');
const titleString = `Title=${titleFormatted}`;
pipeline {
agent {
label 'packerhost'
}
parameters {
string(name: 'AUSER', defaultValue: 'proofOFconcept', description: 'username')
string(name: 'APASS', defaultValue: 'proofOFconcept', description: 'password')
string(name: 'DEPLOY_ENV', defaultValue: 'DEV', description: 'deploy to environment')
}
environment {
@boardstretcher
boardstretcher / interop_ssb.js
Created June 6, 2019 14:38
slack dark mode
document.addEventListener('DOMContentLoaded', function() {
$.ajax({
url: 'https://cdn.jsdelivr.net/gh/laCour/slack-night-mode/css/raw/black.css',
success: function(css) {
let overrides = `
code { background-color: #535353; color: #85c5ff; } /* Change color: to whatever font color you want */
.c-mrkdwn__pre, .c-mrkdwn__quote { background: #535353 !important; background-color: #535353 !important; }
`
$("<style></style>").appendTo('head').html(css + overrides);
}
@boardstretcher
boardstretcher / template_test.rb
Created June 3, 2019 19:36
ruby template testing
require 'erb'
@template_variable = 'hostname.net'
template = ERB.new File.read("/root/checkouts/my_template.erb"), nil, "%"
puts template.result(binding)
## The template file
# .split and .first will split hostname.net into two fields and print the
# first field

Creating Volumes in Pure and Vmware ESXi with a rundeck job

Preperation

  • log into autoadmin as rundeck
cat ./.ssh/id_rsa.pub
  • log into the pure unit with ssh rundeck@pure
  • set the key
#!/bin/bash
function one () {
echo 'RUN: function 1'
}
function two () {
echo 'RUN: function 2'
}
main {
max-width: 38rem;
padding: 2rem;
margin: auto;
}
#!/groovy
node('node1') {
stage('Syntax Testing') {
deleteDir()
checkout scm
try {
sh '/usr/local/bin/rubocop ./cookbooks --fail-level E -f s'
}
catch (Exception ex) {
@boardstretcher
boardstretcher / tmux.conf
Created December 17, 2018 17:18
tmux configuration
# change to ctrl-a like screen
set -g prefix C-a
unbind C-b
bind C-a send-prefix
# panes
set -g pane-border-fg black
set -g pane-active-border-fg brightred
## Status bar design