Skip to content

Instantly share code, notes, and snippets.

View rob-mosher's full-sized avatar

Rob Mosher rob-mosher

View GitHub Profile
@Hengjie
Hengjie / tutorial.md
Last active February 22, 2025 17:48
How to passthrough SATA drives directly on VMWare ESXI 6.5 as RDMs

How to passthrough SATA drives directly on VMWare EXSI 6.5 as RDMs

There aren't many tutorials about this, the only tutorials I've found were about passing through entire PCIe cards to VMs, or refered to old ESXI versions (below 6.5) that used a more comprehensive desktop client instead of the web app. In v6.5, the web app was introduced and the desktop client was deprecated. You used to be able to setup RDMs in the desktop client, but with the introduction of the web console, this is no longer the case. This tutorial shows you how to pass SATA HDDs to the virtual machine on VMWare ESXI 6.5. This tutorial is partially based on VMWare's own KB and the now deprecated Forza IT blog post.

A word about VMWare ESXI 6.7

There is now an option while editing your VM's settings to add a New raw disk when you click `Add ha

@KalenAnson
KalenAnson / installJava.sh
Last active October 4, 2015 05:27
Install Java 8 On Debian Jessie
#!/bin/bash
# ø
# Run this script as root
# Installs Java here: /usr/lib/jvm/java-8-oracle
echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" > /etc/apt/sources.list.d/webupd8team-java.list
echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" >> /etc/apt/sources.list.d/webupd8team-java.list
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys EEA14886
apt-get update
apt-get -y install oracle-java8-installer
java -version
@max-mapper
max-mapper / 0.md
Last active March 7, 2025 13:39
JS hoisting by example

JavaScript function hoisting by example

Below are many examples of function hoisting behavior in JavaScript. Ones marked as works successfuly print 'hi!' without errors.

To play around with these examples (recommended) clone them with git and execute them with e.g. node a.js

Notes on hoisting

(I may be using incorrect terms below, please forgive me)

@hsiboy
hsiboy / VBOX_E_INVALID_VM_STATE.md
Last active September 29, 2024 21:39
rescue a VM from VBOX_E_INVALID_OBJECT_STATE

Issue

$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'ubuntu/trusty64' is up to date...
==> default: Clearing any previously set forwarded ports...
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.
@rothgar
rothgar / install-tmux
Last active August 19, 2024 07:37 — forked from ekiara/how_to_install_tmux_on_centos
Install tmux 1.9 on rhel/centos 6
# Install tmux on Centos release 6.5
# install deps
yum install gcc kernel-devel make ncurses-devel
# DOWNLOAD SOURCES FOR LIBEVENT AND MAKE AND INSTALL
curl -OL https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz
tar -xvzf libevent-2.0.21-stable.tar.gz
cd libevent-2.0.21-stable
./configure --prefix=/usr/local
@okv
okv / gist:2b0d9b6c1c73c036cabc
Created July 22, 2014 10:29
Icinga2: Configuration Syntax Highlighting using Vim
PREFIX=~/.vim && mkdir -p $PREFIX/{syntax,ftdetect} && curl https://raw.githubusercontent.com/Icinga/icinga2/ec75e7dcbbf8c5650197a82107969936220707c8/tools/syntax/vim/syntax/icinga2.vim > $PREFIX/syntax/icinga2.vim && curl https://raw.githubusercontent.com/Icinga/icinga2/ec75e7dcbbf8c5650197a82107969936220707c8/tools/syntax/vim/ftdetect/icinga2.vim > $PREFIX/ftdetect/icinga2.vim
@zlalanne
zlalanne / tmux_cygwin.md
Last active February 3, 2023 23:33
tmux on Cygwin

Steps to install tmux in Cygwin

Install required Cygwin packages

  1. run Cygwin setup.exe
  2. install these packages that are not installed by default: automake, gcc, git and pkg-config

Install libevent

  1. browse http://libevent.org
  2. download libevent-2.0.21-stable.tar.gz
@miguelbaldi
miguelbaldi / install-oracle-jdk.sh
Last active December 25, 2015 20:39
Bash script for installing Oracle JDK|JRE as a Debian Package and optionally configuring java plugin for Mozilla browser. Just follow the instructions: ./install-oracle-jdk.sh Needs sudo installed and configured. Tested on Debian Jessie (testing)
#!/bin/bash
# ---------------------------------------------------------------------------
# install-oracle-jdk.sh - Oracle Java JDK/JRE Debian installer
# Copyright 2013, Miguel A. Baldi Horlle ([email protected])
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
@derchrisuk
derchrisuk / gist:3165794
Created July 23, 2012 19:52
Overviewer build on RaspberryPi
# python setup.py build
running build
running build_py
copying overviewer_core/overviewer_version.py -> build/lib.linux-armv6l-2.6/overviewer_core
running build_ext
building 'overviewer_core.c_overviewer' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I. -I/usr/lib/pymodules/python2.6/numpy/core/include -I/usr/include/python2.6 -c overviewer_core/src/main.c -o build/temp.linux-armv6l-2.6/overviewer_core/src/main.o -Wno-unused-variable -Wno-unused-function -Wdeclaration-after-statement -Werror=declaration-after-statement
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I. -I/usr/lib/pymodules/python2.6/numpy/core/include -I/usr/include/python2.6 -c overviewer_core/src/composite.c -o build/temp.linux-armv6l-2.6/overviewer_core/src/composite.o -Wno-unused-variable -Wno-unused-function -Wdeclaration-after-statement -Werror=declaration-after-statement
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstr
@gyrus
gyrus / gist:3155982
Created July 21, 2012 14:40
Rename WordPress "Posts" to "News"
<?php
/**
* Rename "Posts" to "News"
*
* @link http://new2wp.com/snippet/change-wordpress-posts-post-type-news/
*/
add_action( 'admin_menu', 'pilau_change_post_menu_label' );
add_action( 'init', 'pilau_change_post_object_label' );
function pilau_change_post_menu_label() {