Skip to content

Instantly share code, notes, and snippets.

View slmingol's full-sized avatar
:octocat:
codz

Sam Mingo slmingol

:octocat:
codz
View GitHub Profile
@slmingol
slmingol / Cluster Install info
Created February 15, 2016 20:03 — forked from nsabharwal/Cluster Install info
Cluster install
——————————————————————————————————————
*** Initial setup before Ambari setup ***
——————————————————————————————————————
OS checks:
yum install wget
@slmingol
slmingol / kerberos_setup.md
Created March 10, 2016 02:06 — forked from ashrithr/kerberos_setup.md
Set up kerberos on Redhat/CentOS 7

Installing Kerberos on Redhat 7

This installation is going to require 2 servers one acts as kerberos KDC server and the other machine is going to be client. Lets assume the FQDN's are (here cw.com is the domain name, make a note of the domain name here):

  • Kerberos KDC Server: kdc.cw.com
  • Kerberos Client: kclient.cw.com

Important: Make sure that both systems have their hostnames properly set and both systems have the hostnames and IP addresses of both systems in

@slmingol
slmingol / cryptojs_base64_encrypt_decrypt.js
Created March 28, 2016 19:13 — forked from joecliff/cryptojs_base64_encrypt_decrypt.js
An example of base64 usage in cryptojs
var CryptoJS = require("crypto-js");//replace thie with script tag in browser env
//encrypt
var rawStr = "hello world!";
var wordArray = CryptoJS.enc.Utf8.parse(rawStr);
var base64 = CryptoJS.enc.Base64.stringify(wordArray);
console.log('encrypted:', base64);
//decrypt
var parsedWordArray = CryptoJS.enc.Base64.parse(base64);
@slmingol
slmingol / get-dell-warranty.sh
Created April 21, 2016 05:20 — forked from adam-nielsen/get-dell-warranty.sh
Shell script for retrieving Dell warranty expiration by service tag
#!/bin/sh
# Warranty request script for Dell PCs
# Written by Adam Nielsen <adam.nielsen@uq.edu.au>
# This code is in the public domain, and is supplied with no warranty.
#
# This script uses Dell's web service to retrieve the most distant warranty expiration
# date for a given machine, as identified by its service tag. It requires curl and awk.
# It doesn't parse the WSDL or anything nice like that, it just sends a precomposed
# request to the server and extracts the relevant info from the response.
#!/bin/bash
# define the name or IP address of the machine that will receive the files
HOST=foo
# define the user you are running as on both machines
USER=bar
# define a link to tmpfs where there is plenty of RAM free
# by default /tmp is mounted with 1/2 physical memory and this test as written below
@slmingol
slmingol / elasticsearch-handlers-main.yml
Created June 8, 2016 13:58 — forked from labrown/elasticsearch-handlers-main.yml
Ansible rolling restart of Elasticsearch Cluster
---
###
# Elasticsearch Rolling restart using Ansible
###
##
## Why is this needed?
##
#
# Even if you use a serial setting to limit the number of nodes processed at one
@slmingol
slmingol / Linux Static IP
Created June 23, 2016 17:47 — forked from fernandoaleman/Linux Static IP
How To Configure Static IP On CentOS 6
## Configure eth0
#
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
NM_CONTROLLED="yes"
ONBOOT=yes
HWADDR=A4:BA:DB:37:F1:04
TYPE=Ethernet
BOOTPROTO=static
@slmingol
slmingol / ignore.md
Created July 16, 2016 23:19 — forked from tmaybe/ignore.md
ignoring merge conflicts for specific files in a git repository

How to Ignore Merge Conflicts for Specific Files in a Git Repository

Create a directory and git init it

$ mkdir merge-test
$ cd merge-test/
$ git init
@slmingol
slmingol / gpg-git-smudge-clean.md
Created July 31, 2016 03:05 — forked from g-k/gpg-git-smudge-clean.md
test transparent git encryption with smudge clean filters using gpg

Generate a GPG Key and revocation cert per http://www.gnupg.org/gpg/en/manual.html:

gpg --key-gen
gpg --output revoke.asc --gen-revoke <my user ID or email>

Once gpg key in keyring we can encrypt and decrypt files.

@slmingol
slmingol / haproxy.cfg
Created August 18, 2016 03:42 — forked from fumin/haproxy.cfg
Haproxy config file for SSL and basic authentication
# Haproxy config file for SSL and basic authentication
#
# Since ssl is needed, we need to use
# `make TARGET=linux26 USE_OPENSSL=1 ADDLIB=-lz` to install haproxy.
# Also, haproxy version must be haproxy-1.5-dev19 or above.
#
# An example curl command that queryies pic-collage.com/api/collages/feed is
# `curl -k -v -u 'collages:password' 'https://ec2-ip.compute-1.amazonaws.com/api/collages/feed'`
userlist collages_dyno