Skip to content

Instantly share code, notes, and snippets.

@sjjohansen
sjjohansen / hue_unix_sync_cm.txt
Last active May 12, 2016 03:19
Hue Unix account sync with CM
# get the current HUE credential password for CM
cat /proc/`ps -ef| grep hue |\
grep runcherrypyserver |\
awk '{print $2}'`/environ |\
sed 's/.*\(HADOOP_CREDSTORE_PASSWORD=.*\)/\1/'
export HUE_CONF_DIR="/var/run/cloudera-scm-agent/process/`ls -alrt /var/run/cloudera-scm-agent/process | grep HUE | tail -1 | awk '{print $9}'`"
export JAVA_HOME=/usr/java/default
export HADOOP_CREDSTORE_PASSWORD=xxxxxxxxxxxxxxx
build/env/bin/hue useradmin_sync_with_unix
@sjjohansen
sjjohansen / aes_ni_openssl.txt
Created September 29, 2015 19:55
Test AES-NI with Openssl
cat /proc/cpuinfo | grep aes
openssl speed aes-128-cbc
openssl speed -evp aes-128-cbc
@sjjohansen
sjjohansen / aws_cli_pyenv
Last active August 19, 2020 19:42
Adding AWS CLI in Python Virtualenv on MacOS X
# create a directory for you Python Virtual Environments
mkdir -p ~/pyenvs
# create one for the AWS cli then install the CLI
virtualenv ~/pyenvs/aws
~/pyenvs/aws/bin/pip install awscli
~/pyenvs/aws/bin/pip install boto
@sjjohansen
sjjohansen / py_virtualenv_centos.txt
Created November 20, 2014 23:51
Python Virtualenv using EPEL on CentOS 6
# install epel
yum -y install epel-release
# install rpms
yum -y install python-pip python-virtualenv
# setup a virtual environment
virtualenv pyenv
source pyenv/bin/activate
@sjjohansen
sjjohansen / vsphere_hypervisor_usb.txt
Created October 21, 2014 04:51
VMware install ISO on USB
# partition a single msdos partition and make it active:
$ cat /tmp/sdb.save
# partition table of /dev/sdb
unit: sectors
/dev/sdb1 : start= 2048, size= 30272704, Id= c, bootable
/dev/sdb2 : start= 0, size= 0, Id= 0
/dev/sdb3 : start= 0, size= 0, Id= 0
/dev/sdb4 : start= 0, size= 0, Id= 0
@sjjohansen
sjjohansen / mock_for_rpms.txt
Created October 19, 2014 22:39
Setup Mock for rpm builds
# pre-req packages
yum -y groupinstall "Development Tools"
yum -y install yum-utils
yum -y install epel-release
yum -y install mock rpm-build
yum -y install wget
yum -y install createrepo
@sjjohansen
sjjohansen / livecd-to-usb.txt
Created October 18, 2014 22:32
fedora livecd to usb
# OSX
# find the USB device
diskutil list
diskutil unmountDisk /dev/disk2
# dd the ISO onto the raw device
sudo dd if=/Users/sjj/Software/ISOs/Linux/Fedora/20/Fedora-20-x86_64-netinst.iso of=/dev/disk2 bs=1m