Skip to content

Instantly share code, notes, and snippets.

View rvalente's full-sized avatar

Ron Valente rvalente

  • NC
View GitHub Profile
cask_args appdir: "/Applications", require_sha: true
tap "railwaycat/emacsmacport"
brew "curl"
brew "delve"
brew "emacs-mac"
brew "git"
brew "git-delta"
brew "gnupg"
@rvalente
rvalente / main.go
Last active June 21, 2019 19:25
Variable Object Names in GoLang
package main
import (
"fmt"
"encoding/json"
"io/ioutil"
"os"
)
@rvalente
rvalente / aide.sh
Last active November 24, 2022 23:03
CentOS 7 Secure Deployment
#!/bin/bash -eux
# Disable prelinking altogether for aide
if grep -q ^PRELINKING /etc/sysconfig/prelink
then
sed -i 's/PRELINKING.*/PRELINKING=no/g' /etc/sysconfig/prelink
else
echo -e "\n# Set PRELINKING=no per security requirements" >> /etc/sysconfig/prelink
echo "PRELINKING=no" >> /etc/sysconfig/prelink
fi
def apply_initial_configuration
# Memory Sizes
MEGABYTE = 1024.freeze
# Get System Memory and CPU Count
total_mem = %x(free).split(" ")[7].to_i
available_mem = %x(free).split(" ")[12].to_i
ncpus = Etc.nprocessors
# If we are dedicated, use current available for effective cache
@rvalente
rvalente / create_zone.sh
Last active March 26, 2018 17:47
Create ManageIQ Zone via Rails Runner
## Create the new zone
$ bundle exec rails r 'Zone.create!(:name => "name", :description => "description")'
## Add NTP settings to the zone
$ bundle exec rails c
=> z.add_settings_for_resource(:ntp => {:server => ['0.pool.ntp.org']})
@rvalente
rvalente / iterate.rb
Last active March 12, 2018 20:39
ManageIQ Template Subset
templates = $evm.vmdb(:template_vmware)
templates.all.each do |t|
puts "#{t.name} -- #{t.operating_system.product_name}"
end
@rvalente
rvalente / ldap.conf
Created May 2, 2017 11:43
openldap.conf
#
# LDAP Defaults
#
# See ldap.conf(5) for details
# This file should be world readable but not world writable.
BASE dc=domain,dc=tld
URI ldaps://ad.domain.tld
@rvalente
rvalente / answers.txt
Created February 8, 2017 10:48
Alpine Linux Install
# Use US layout with US variant
KEYMAPOPTS="us us"
# Set hostname to alpine-test
HOSTNAMEOPTS="-n fw"
# Contents of /etc/network/interfaces
INTERFACESOPTS="auto lo
iface lo inet loopback
@rvalente
rvalente / ruleset.nft
Last active February 8, 2017 11:44
Nftables Statefull Firewall
#!/usr/sbin/nft -f
flush ruleset
# Interfaces and Networks
define wan = eth0
define lan = eth1
table ip filter {
chain input {

Keybase proof

I hereby claim:

  • I am rvalente on github.
  • I am ronaldvalente (https://keybase.io/ronaldvalente) on keybase.
  • I have a public key ASDIhn7THEHhWURdfXdUMAulZoUtyy72wk0hOBn63Poq7wo

To claim this, I am signing this object: