Skip to content

Instantly share code, notes, and snippets.

View therevoman's full-sized avatar

Nate Revo therevoman

  • Red Hat, Inc
  • Utah
View GitHub Profile
@therevoman
therevoman / zfs
Created September 28, 2015 04:08 — forked from joshenders/zfs
/etc/sudoers.d/zfs
# Allow read-only ZoL commands to be called through sudo without a password.
# Cmnd alias specification
Cmnd_Alias RO_ZFS = \
/sbin/zfs "", /sbin/zfs help *, \
/sbin/zfs get, /sbin/zfs get *, \
/sbin/zfs list, /sbin/zfs list *, \
/sbin/zpool "", /sbin/zpool help *, \
/sbin/zpool iostat, /sbin/zpool iostat *, \
/sbin/zpool list, /sbin/zpool list *, \
@therevoman
therevoman / redis-server
Last active October 4, 2016 23:24 — forked from tessro/redis-server
A CentOS initscript for Redis
#!/bin/sh
#
# redis - this script starts and stops the redis-server daemon
#
# chkconfig: - 85 15
# description: Redis is a persistent key-value database
# processname: redis-server
# config: /etc/redis/6379.conf
# config: /etc/sysconfig/redis
# pidfile: /var/run/redis_6379.pid
@therevoman
therevoman / xa-datasources-spring.xml
Created November 8, 2016 16:22 — forked from teabot/xa-datasources-spring.xml
Example distributed XA transaction configuration for: Bitronix BTM, Spring, Hibernate, IBatis, Last Resource Commit
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:tx="http://www.springframework.org/schema/tx" xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
http://www.springframework.org/schema/util
@therevoman
therevoman / openshift-cheatsheet.md
Created August 18, 2018 04:06 — forked from rafaeltuelho/openshift-cheatsheet.md
My Openshift Cheatsheet
  • Change Default response timeout for a specific route:
oc annotate route <route_name> --overwrite haproxy.router.openshift.io/timeout=10s
  • Add a nodeSelector on RC ou DC
oc patch dc|rc <dc_name> -p "spec:                                                                                         
  template:     
@therevoman
therevoman / poc.rb
Created December 10, 2018 20:51 — forked from zelivans/poc.rb
CVE-2018-1002105 exploit
#!/usr/bin/env ruby
require 'socket'
require 'openssl'
require 'json'
host = 'kubernetes'
metrics = '/apis/metrics.k8s.io/v1beta1'
sock = TCPSocket.new host, 443
@therevoman
therevoman / mount_qcow2.md
Created July 18, 2019 15:57 — forked from shamil/mount_qcow2.md
How to mount a qcow2 disk image

How to mount a qcow2 disk image

This is a quick guide to mounting a qcow2 disk images on your host server. This is useful to reset passwords, edit files, or recover something without the virtual machine running.

Step 1 - Enable NBD on the Host

modprobe nbd max_part=8
@therevoman
therevoman / Update-branch.md
Created July 23, 2019 23:21 — forked from santisbon/Update-branch.md
Bring your feature branch up to date with master. Deploying from Git branches adds flexibility. Bring your branch up to date with master and deploy it to make sure everything works. If everything looks good the branch can be merged. Otherwise, you can deploy your master branch to return production to its stable state.

Updating a feature branch

First we'll update your local master branch. Go to your local project and check out the branch you want to merge into (your local master branch)

$ git checkout master

Fetch the remote, bringing the branches and their commits from the remote repository. You can use the -p, --prune option to delete any remote-tracking references that no longer exist in the remote. Commits to master will be stored in a local branch, remotes/origin/master

@therevoman
therevoman / etcd-defrag.sh
Created September 3, 2019 19:11 — forked from canhnt/etcd-defrag.sh
Compact and defrag etcd cluster
# Ref https://github.com/etcd-io/etcd/blob/master/Documentation/op-guide/maintenance.md#space-quota
export ETCDCTL_API=3
etcdctl endpoint status --write-out="json"
etcdctl endpoint status --write-out="table"
etcdctl compact $rev
etcdctl defrag
etcdctl endpoint status --write-out="table"
etcdctl alarm list
@therevoman
therevoman / zfs_health.sh
Created September 3, 2019 19:16 — forked from petervanderdoes/zfs_health.sh
ZFS Health Check Script
#! /usr/local/bin/bash
#
# Calomel.org
# https://calomel.org/zfs_health_check_script.html
# FreeBSD 9.1 ZFS Health Check script
# zfs_health.sh @ Version 0.15
# Check health of ZFS volumes and drives. On any faults send email. In FreeBSD
# 10 there is supposed to be a ZFSd daemon to monitor the health of the ZFS
# pools. For now, in FreeBSD 9, we will make our own checks and run this script
@therevoman
therevoman / Chromium Linux.md
Created September 16, 2019 22:42 — forked from marians/Chromium Linux.md
How to install CA certificates and PKCS12 key bundles on different platforms

We install certutil and pk12util if necessary:

sudo apt install libnss3-tools

On Linux, Chromium uses the NSS Shared DB. Check if you have the ~/.pki/nssdb directory:

ls $HOME/.pki/nssdb