Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am richvred on github.
  • I am rvannauker (https://keybase.io/rvannauker) on keybase.
  • I have a public key ASAIfGACPSA5SJUxVrS2D7qhscSA8KzWUwthuB1NkN_XIQo

To claim this, I am signing this object:

@RichVRed
RichVRed / rescan.sh
Created April 13, 2018 02:59 — forked from rafaelfoster/rescan.sh
Rescan the devices (can detect new space when disk is resized OR new devices that were attached)
# Reference: http://blog.gurudelleccelsopicco.org/2009/09/online-lun-expansion-and-partition-resizing-without-reboot-under-linux/
echo 1 > /sys/block/[DEVICE]/device/rescan
# DETECT IF NEW DISKS ARE ATTACHED TO THE HOST
# Reference: http://www.cyberciti.biz/tips/vmware-add-a-new-hard-disk-without-rebooting-guest.html
ls /sys/class/scsi_host
@RichVRed
RichVRed / debian-stretch-fde.md
Last active March 26, 2018 06:59 — forked from ppmathis/debian-stretch-fde.md
Guide which explains an installation of Debian Stretch with full disk encryption (including "/boot" partition, containing initramfs+kernel) by using Debian Jessie Live.

Debian Stretch - Full Disk Encryption

This documents guides you through the process to install Debian Stretch with Full Disk Encryption. The following requirements exist:

  • Mainboard with UEFI-Support
  • Debian Stretch Live CD booted from UEFI
  • Two unformatted, unpartitioned HDDs/SSDs for Software RAID1 with mdmadm

After following this guide, you will end up with a setup like this:

  • Redundant GRUB Standalone EFI installation on both disks
@RichVRed
RichVRed / fix_github_https_repo.sh
Created March 1, 2018 22:45 — forked from m14t/fix_github_https_repo.sh
Convert HTTPS github clones to use SSH
#/bin/bash
#-- Script to automate https://help.github.com/articles/why-is-git-always-asking-for-my-password
REPO_URL=`git remote -v | grep -m1 '^origin' | sed -Ene's#.*(https://[^[:space:]]*).*#\1#p'`
if [ -z "$REPO_URL" ]; then
echo "-- ERROR: Could not identify Repo url."
echo " It is possible this repo is already using SSH instead of HTTPS."
exit
fi
@RichVRed
RichVRed / wget
Created February 27, 2018 05:20 — forked from bueckl/wget
Wget examples
#Spider Websites with Wget – 20 Practical Examples
Wget is extremely powerful, but like with most other command line programs, the plethora of options it supports can be intimidating to new users. Thus what we have here are a collection of wget commands that you can use to accomplish common tasks from downloading single files to mirroring entire websites. It will help if you can read through the wget manual but for the busy souls, these commands are ready to execute.
1. Download a single file from the Internet
wget http://example.com/file.iso
2. Download a file but save it locally under a different name
wget ‐‐output-document=filename.html example.com
@RichVRed
RichVRed / add_intellij_launcer
Created January 31, 2018 19:44 — forked from rob-murray/add_intellij_launcer
Add Intellij launcher shortcut and icon for ubuntu
// create file:
sudo vim /usr/share/applications/intellij.desktop
// add the following
[Desktop Entry]
Version=13.0
Type=Application
Terminal=false
Icon[en_US]=/home/rob/.intellij-13/bin/idea.png
Name[en_US]=IntelliJ
@RichVRed
RichVRed / xorg_depgraph.dot
Created October 26, 2017 06:56 — forked from emarsk/xorg_depgraph.dot
Xorg dependency graph, as in BLFS book
// Xorg dependency graph (dot)
// BLFS 7.8
//
// style=solid : required
// style=dashed : recommended
// style=dotted : optional
// style=solid arrowhead=dot color=grey : required at runtime
strict digraph xorg {
label="Xorg dependencies
@RichVRed
RichVRed / sqltagcloud.sql
Created September 13, 2017 19:40 — forked from azcoov/sqltagcloud.sql
SQL Tag Cloud
declare @MaxTagFrequency int
declare @tt_Tags table(
BlogCategory_ID int,
[Count] int
)
insert into
@tt_Tags
select top(@CountLimit)
bc.BlogCategory_ID,
@RichVRed
RichVRed / linux-explorer.sh
Created July 3, 2017 17:24 — forked from jfinstrom/linux-explorer.sh
linux-explorer script from unix consultants modified to collect asterisk stuff
#!/bin/bash
##############################################################################
#
#
# FILE : linux-explorer.sh
# Last Change Date : 3-06-2014
# Author(s) : Joe Santoro
# Date Started : 15th April, 2004
# Email : linuxexplo [ at ] unix-consultants.com
# Web : http://www.unix-consultants.com/examples/scripts/linux/linux-explorer
@RichVRed
RichVRed / service-checklist.md
Last active September 29, 2017 19:40 — forked from acolyer/service-checklist.md
Internet Scale Services Checklist

Internet Scale Services Checklist

A checklist for designing and developing internet scale services, inspired by James Hamilton's 2007 paper "On Desgining and Deploying Internet-Scale Services."

Basic tenets

  • Does the design expect failures to happen regularly and handle them gracefully?
  • Have we kept things as simple as possible?