Skip to content

Instantly share code, notes, and snippets.

View kfiresmith's full-sized avatar

Kodiak Firesmith kfiresmith

View GitHub Profile
@kfiresmith
kfiresmith / redshift.service.user
Last active July 3, 2017 23:41
redshift user service
~/.config/systemd/user/redshift.service
[Unit]
Description=Redshift display colour temperature adjustment
Documentation=http://jonls.dk/redshift/
After=display-manager.service
[Service]
ExecStart=/usr/bin/redshift -v -c /home/kfiresmith/.redshift.conf
Restart=always
~/.redshift.conf
[redshift]
temp-day=5500
temp-night=4000
brightness-day=0.8
brightness-night=0.7
gamma-day=0.7
gamma-night=0.6
transition=0
adjustment-method=randr
def my_dns(lookup_string):
my_record = urllib.request.urlopen(lookup_string)
data = my_record.read()
encoding = my_record.info().get_content_charset('utf-8')
dns = json.loads(data.decode(encoding))
return(dns[0]["value"])
@kfiresmith
kfiresmith / stellar_generate_and_print.py
Last active December 29, 2017 20:58
stellar_generate_and_print.py
#Use Python SDK from StellarCN to quickly generate deterministic wallets/keypairs
from stellar_base.utils import StellarMnemonic
from stellar_base.keypair import Keypair
sm = StellarMnemonic()
m = sm.generate()
print('\n' "Secret word list for deterministic seed:")
print(" " + m)
kp = Keypair.deterministic(m, lang='english')
@kfiresmith
kfiresmith / RHEL7_buildreqs_OpenAFS
Created March 17, 2018 12:36
RHEL 7 OpenAFS Build Requirements
#!/bin/bash
yum -y install rpm-build bison perl-ExtUtils-Embed flex ncurses-devel pam-devel krb5-devel kernel-devel gcc
@kfiresmith
kfiresmith / emit-sha512.py
Created April 19, 2020 14:16
kickstart sh512 password hasher
#! /usr/bin/python
# Prompt user for a password string, then create a salted SHA512 hash
import crypt
import getpass
import sys
sys.dont_write_bytecode = True
userinput = getpass.getpass(prompt='Enter a password string to hash in SHA-512: ')
" tabstop: Width of tab character
" softtabstop: Fine tunes the amount of white space to be added
" shiftwidth Determines the amount of whitespace to add in normal mode
" expandtab: When on uses space instead of tabs
set tabstop =2
set softtabstop =2
set shiftwidth =2
set expandtab
set autoindent
set smartindent
@kfiresmith
kfiresmith / gitconfig
Last active April 16, 2021 10:45
My gitconfig
[user]
name = Kodiak Firesmith
email = firesmith@protonmail.com
username = kfiresmith
[core]
editor = vim
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
pager = delta
[web]
browser = firefox
@kfiresmith
kfiresmith / .vimrc
Created April 18, 2021 23:53
vimrc-laptop
" tabstop: Width of tab character
" softtabstop: Fine tunes the amount of white space to be added
" shiftwidth Determines the amount of whitespace to add in normal mode
" expandtab: When on uses space instead of tabs
set tabstop =2
set softtabstop =2
set shiftwidth =2
set expandtab
set autoindent
set smartindent
@kfiresmith
kfiresmith / syntheticdata.csv
Created June 2, 2021 21:18
simple synthetic CSV file data for pie chart
svm capacity-tb available-tb category
cifs-share 54 28 Fileshare
foo-cifs 19 4 Project Data
VM02 109 49 Virtual Machine Storage
nfs01 40 22 Project Data
VM-02 65 31 Virtual Machine Storage
VM-01 65 44 Virtual Machine Storage
nfs-foo-01 43 29 Project Data
cifs-project-01 20 1 Project Data
nfs-foo-01_dest_0 21 3 Replication & Disaster Recovery