Skip to content

Instantly share code, notes, and snippets.

View gravcat's full-sized avatar

Nick Thieling gravcat

View GitHub Profile

creating a basic volume mounted for usage as type "Directory"

# clean device of any partitions or filesystem metadata
wipefs -a /dev/fioa

# create new ext4 filesystem across disk, no partition necessary
mkfs.ext4 /dev/fioa

# append mount instruction to /etc/fstab

test

@gravcat
gravcat / keybase.md
Created September 12, 2019 19:08
keybase.md

Keybase proof

I hereby claim:

  • I am gravcat on github.
  • I am nthieling (https://keybase.io/nthieling) on keybase.
  • I have a public key ASBmxoeDcHt95sIyY6eCSkyfCpFtvmzUi9Aa1e9Glpj5mwo

To claim this, I am signing this object:

@gravcat
gravcat / clone_project_repos.py
Last active May 15, 2019 16:01
works on stash/bitbucket server 5.3.1+(?)
import os
import json
import argparse
import stashy
parser = argparse.ArgumentParser()
parser.add_argument('-u','--username', help='Stash username used in API authentication.')
parser.add_argument('-p', '--password', help='Stash password used in API authentication.')
args = parser.parse_args()
@gravcat
gravcat / Get-Checksum.ps1
Last active April 10, 2019 12:51
call script, input filename, receive bacon (or a sha256sum by default)
param (
[String]
$File,
[String]
$Alg = SHA256
)
(Get-FileHash $File -Algorithm $Alg).Hash.ToLower()
avconv -ar 44100 \
-ac 2 \
-acodec pcm_s16le \
-f s16le \
-ac 2 \
-i /dev/zero \
-f video4linux2 \
-r ${OUTPUT_FRAMERATE} \
-i ${VIDEO_DEVICE} \
-vcodec copy \
@gravcat
gravcat / traefix-example.toml
Last active January 6, 2019 17:04
example for peertube https://joinpeertube.org/en/, specific to our "adrift.io" domain
# Uncomment this line in order to enable debugging through logs
# debug = true
defaultEntryPoints = ["http", "https"]
[entryPoints]
[entryPoints.http]
address = ":80"
[entryPoints.https]
address = ":443"
[entryPoints.https.tls]
MinVersion = "VersionTLS12"
<#
.NAME
add_user_to_ad_groups.ps1
.PARAMETER username
Username which you will add group memberships to.
.PARAMETER import_file
If not running in single_group mode (see single_group parameter), declare the CSV file that holds all desired groups to make the user become a member of.
@gravcat
gravcat / open_tools_as_domain_admin.ps1
Created January 2, 2019 18:17
open a desired tool as another user, such as a domain admin
param (
$domain = $env:USERDOMAIN
)
$ErrorActionPreference = "Stop"
function Get-AdminUsername {
# Admin username determinationator
$user = $env:USERNAME