Skip to content

Instantly share code, notes, and snippets.

View mfernest's full-sized avatar

Michael Ernest mfernest

  • August Data
  • San Francisco Bay Area
  • 02:20 (UTC -07:00)
  • LinkedIn in/michaelernest
View GitHub Profile
@mfernest
mfernest / XGH - PT-BR.txt
Last active August 29, 2015 14:26 — forked from banaslee/XGH - de-de.txt
eXtreme Go-Horse Process
Fonte: http://gohorseprocess.wordpress.com
1- Pensou, não é XGH.
XGH não pensa, faz a primeira coisa que vem à mente. Não existe
segunda opção, a única opção é a mais rápida.
2- Existem 3 formas de se resolver um problema, a correta, a errada e
a XGH, que é igual à errada, só que mais rápida.
@mfernest
mfernest / snapshot_transcript.txt
Last active January 28, 2016 10:28
Boot camp transcripts
[mboeru]
# sudo -u hdfs hadoop fs -put /tmp/social-landlord-rents-borough.xls /user/hdfs/social-landlord-rents-borough.xls
# sudo -u hdfs hdfs dfsadmin -allowSnapshot /user/hdfs
Allowing snaphot on /user/hdfs succeeded
# sudo -u hdfs hdfs dfs -createSnapshot /user/hdfs snap1
Created snapshot /user/hdfs/.snapshot/snap1
# sudo -u hdfs hadoop fs -put /tmp/social-landlord-rents-borough.xls /user/hdfs/social-landlord-rents-borough.xls
# sudo -u hdfs hdfs dfsadmin -allowSnapshot /user/hdfs
/**
* Created by prungta on 7/22/15.
*/
import org.apache.oozie.client.AuthOozieClient;
import org.apache.oozie.client.OozieClient;
import org.apache.oozie.client.OozieClientException;
import org.apache.oozie.client.WorkflowJob;
import javax.security.auth.Subject;
import javax.security.auth.login.AppConfigurationEntry;

Install gdisk, an fdisk-style tool for GUID Partition Tables (GPT)

# yum -y install gdisk

Observe tool's version

[root@ /]# gdisk
GPT fdisk (gdisk) version 0.8.10
@mfernest
mfernest / 0_prechecks.sh
Last active July 15, 2021 13:20
CM Path B Installation
#!/bin/sh
source ./control.sh
function no_hugepages() {
echo never > /sys/kernel/mm/transparent_hugepage/enabled
echo never > /sys/kernel/mm/transparent_hugepage/defrag
}
function verify_capacity() {
@mfernest
mfernest / get-hive-usage-user.py
Last active January 16, 2021 23:27
Use CM API to report Hive usage
#!/usr/bin/python
## ********************************************************************************
## get-yarn-usage.py
##
## Usage: ./get-hive-usage-user.py
##
## Edit the settings below to connect to your Cluster
##
## ********************************************************************************
@mfernest
mfernest / TeraTune.sh
Created February 26, 2017 14:20
Script to test wall time of teragen/terasort exercise
#!/bin/sh
## Test for optimal mix of mappers, reducers, and container allocations
## Modified from ripped-off script, attributed to BVT and excised Cloudera docs
## Paths below correspond to active parcel installation
MR=/opt/cloudera/parcels/CDH/lib/hadoop-0.20-mapreduce
CDH=/opt/cloudera/parcels/CDH/bin
@mfernest
mfernest / MySQL_JDBC.sh
Created August 16, 2017 17:53
Install MySQL JDBC connector
#!/bin/sh
## Install MySQL JDBC 5.1.40 Connector
function setDir()
{
mkdir -p /usr/share/java/
chmod a+rx /usr/share/java
rm -f /usr/share/java/mysql-connector-java.jar
}
@mfernest
mfernest / openssl_commands.md
Created April 27, 2019 15:01 — forked from p3t3r67x0/openssl_commands.md
Some list of openssl commands for check and verify your keys

openssl

Install

Install the OpenSSL on Debian based systems

sudo apt-get install openssl

You: ant

ChatGPT: It seems like you've mentioned "ant." Ants are small insects that are part of the order Hymenoptera, which also includes bees and wasps. They are known for their social behavior, living in colonies or nests, and for their ability to work together effectively. Ant colonies typically consist of a queen, worker ants, and sometimes soldier ants. Ants are highly organized, communicate using pheromones, and engage in various tasks such as foraging, caring for larvae, and defending the colony. They play important roles in ecosystems, such as soil aeration and nutrient cycling, but can also be considered pests when they invade human habitats or agricultural fields.

 You: aunt