Skip to content

Instantly share code, notes, and snippets.

View heathseals's full-sized avatar
🏠
Working from home

Heath Seals heathseals

🏠
Working from home
View GitHub Profile
@rubiojr
rubiojr / rbvmomi_example1.rb
Created September 5, 2011 15:28
Ruby VMWare VSphere API Example 1 (rbvmomi)
require 'rubygems'
require 'rbvmomi'
require 'pp'
require 'alchemist'
hyper = 'thunder03'
vim = RbVmomi::VIM.connect :host => hyper, :user => 'root', :password => 'secret', :insecure => true
#
# get current time
@earthgecko
earthgecko / bash.generate.random.alphanumeric.string.sh
Last active July 4, 2024 17:31
shell/bash generate random alphanumeric string
#!/bin/bash
# bash generate random alphanumeric string
#
# bash generate random 32 character alphanumeric string (upper and lowercase) and
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
# bash generate random 32 character alphanumeric string (lowercase only)
cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 32 | head -n 1
@SeonghoonKim
SeonghoonKim / graylog2-bootstrap.sh
Last active October 1, 2021 09:46
graylog2 install script for RHEL/CentOS 6
#!/bin/bash
MONGODB_REPO="/etc/yum.repos.d/10gen-mongodb.repo"
CENTOS_REPO="/etc/yum.repos.d/CentOS-Base.repo"
EPEL_REPO="/etc/yum.repos.d/epel.repo"
PASSENGER_REPO="/etc/yum.repos.d/passenger.repo"
APP_ROOT="/opt"
[ -f "$APP_ROOT" ] || mkdir -p $APP_ROOT
@crosson
crosson / ssh.rb
Last active December 17, 2015 02:19
Tool I use to log into cisco or F5 devices.
require 'rubygems'
require 'net/ssh'
require 'net/ssh/telnet'
class SSH
attr_accessor :errors
def initialize(creds)
begin
@ssh_session = Net::SSH.start(creds[:host], creds[:user], :password => creds[:password], :keys => [])
@atenni
atenni / README.md
Last active July 20, 2024 05:49
How to permalink to a gist's raw file

Problem: When linking to the raw version of a gist, the link changes with each revision.

Solution:

To return the first file from a gist: https://gist.github.com/[gist_user]/[gist_id]/raw/

To get a file from multi–file gist: https://gist.github.com/[gist_user]/[gist_id]/raw/[file_name]

@trinitronx
trinitronx / xcode-cli-tools.sh
Last active January 18, 2024 05:20
Script to download & install XCode Command Line tools on OSX 10.7 or 10.8. Lifted from jedi4ever/veewee template.
#!/bin/sh
# 2021-12-09:
# This script is no longer supported!
# Apple broke all direct downloads without logging with an Apple ID first.
# The number of hoops that a script would need to jump through to login,
# store cookies, and download is prohibitive.
# Now we all must manually download and mirror the files for this to work at all :'-(
OSX_VERS=$(sw_vers -productVersion | awk -F "." '{print $2}')
@hofmannsven
hofmannsven / README.md
Last active July 16, 2024 01:30
Git CLI Cheatsheet
@andrewlkho
andrewlkho / gist:7373190
Last active March 25, 2024 03:37
How to use authentication subkeys in gpg for SSH public key authentication

GPG subkeys marked with the "authenticate" capability can be used for public key authentication with SSH. This is done using gpg-agent which, using the --enable-ssh-support option, can implement the agent protocol used by SSH.

Requirements

A working gpg2 setup is required. It may be possible to use gpg 1.4 but with gpg-agent compiled from gpg2. If you are using OS X 10.9 (Mavericks) then you may find the instructions [here][1] useful.

@stephenyeargin
stephenyeargin / README.md
Last active February 15, 2018 21:14
Add B-cycle widgets to your Dashing dashboard.

B-cycle Widget

Screenshot

B-cycle is a bike sharing service that operates in several American cities. More information at their website. This widget allows you to use the station ID in a widget to get the current count of bikes and docks available to show on your Dashing dashboard.

Demo

A demo repository is available on GitHub and here is a live Dashboard on Heroku.

@simonista
simonista / .vimrc
Last active July 21, 2024 14:41
A basic .vimrc file that will serve as a good template on which to build.
" Don't try to be vi compatible
set nocompatible
" Helps force plugins to load correctly when it is turned back on below
filetype off
" TODO: Load plugins here (pathogen or vundle)
" Turn on syntax highlighting
syntax on