Skip to content

Instantly share code, notes, and snippets.

@cerealskill
cerealskill / spark-shell
Created May 31, 2018 14:58
Error when execute spark-shell on Cloudera Manager - Error initializing SparkContext
18/05/31 13:03:10 ERROR spark.SparkContext: Error initializing SparkContext.
org.apache.spark.SparkException: Yarn application has already ended! It might have been killed or unable to launch application master.
at org.apache.spark.scheduler.cluster.YarnClientSchedulerBackend.waitForApplication(YarnClientSchedulerBackend.scala:124)
at org.apache.spark.scheduler.cluster.YarnClientSchedulerBackend.start(YarnClientSchedulerBackend.scala:64)
at org.apache.spark.scheduler.TaskSchedulerImpl.start(TaskSchedulerImpl.scala:151)
at org.apache.spark.SparkContext.<init>(SparkContext.scala:538)
at org.apache.spark.repl.SparkILoop.createSparkContext(SparkILoop.scala:1022)
at $line3.$read$$iwC$$iwC.<init>(<console>:15)
at $line3.$read$$iwC.<init>(<console>:25)
at $line3.$read.<init>(<console>:27)
@cerealskill
cerealskill / autofirma_certificado_host.sh
Last active July 12, 2018 14:08
Cloudera Manager + Kerberos-Direct-AD (Use Self-Signed Certificates for TLS ) All Host Node
#!/bin/bash
# Autofirmado de certificados para cada host Cloudera Manager para la activacion de (TLS)
# SE COMENTA PARA DESPLIEGUE PRE-PRODUCTIVO / DESCOMENTAR PARA NUEVO DESPIEGUE
#export JAVA_HOME=/usr/java/jdk1.7.0_67-cloudera
#
echo "(1/5) Creando directorios de almacenamiento de certificados autofirmados";
sudo mkdir -p /opt/cloudera/security/x509/ /opt/cloudera/security/jks/ /opt/cloudera/security/pki/
sudo chown -R cloudera-scm:cloudera-scm /opt/cloudera/security/jks
sudo chown -R cloudera-scm:cloudera-scm /opt/cloudera/security/pki/
@cerealskill
cerealskill / Deploy_Cloudera.sh
Last active June 8, 2018 13:52
Deploy Cloudera Manager on CentOS 7 (Edge Host)
#!/bin/bash
echo "Antes de ejecutar asegurar de tener jdk-8u144-linux-x64.tar.gz en el HOME";
echo "El parametro N1 es el nombre de host completo FQDN";
#sudo cp jdk-8u144-linux-x64.tar.gz /opt/
#cd /opt/
#sudo tar xzf jdk-8u144-linux-x64.tar.gz
echo "Instalamos JDK 8 8u144";
@cerealskill
cerealskill / chef_server_install.sh
Last active May 8, 2018 14:48
Chef Server Instalacion CentOS 7
#!/bin/bash
echo "CHEF Server Install Script 1.0.";
echo "Parametro N°(1) -> Password";
echo "Probado en CentOS 7 version 7.4.1708.";
echo "https://www.itzgeek.com/how-tos/linux/centos-how-tos/setup-chef-12-centos-7-rhel-7.html";
echo "1. Descargamamos la utilidad wget que permite descargar los packages del repositorio oficial.";
yum -y install wget
echo "2. Descargamos el package pre-compilado.";
#wget https://packages.chef.io/stable/el/7/chef-server-core-12.10.0-1.el7.x86_64.rpm
@cerealskill
cerealskill / ntfs_for_mac.links
Created April 21, 2018 04:16
FUCK NTFS ON MACOSX -- Estamos cansados joder!
@cerealskill
cerealskill / mega_url.txt
Last active April 21, 2018 00:15
Windos Loader 7
Windows Loader 7
https://www.dropbox.com/s/mbqf9e4olywknk9/W7L.rar?dl=0
Elimina activadores y restaura el estaod original de tu windows
MBR.Regenerator.v4.5 .rar
https://mega.nz/#!C5dTDYoK!Ukf0dmnthaLwIS0U8R0fmxTo1tLFbBj0dFJd2NAZfIk
Microsoft Toolkit 2.5.3 Final - Activa Office 2010, 2013, win 7 y win 8.1
MTK.v2.5.3 .rar
https://mega.nz/#!i1U13CjY!57g_h2WvX5Ow6lNRdKlk694gbc8JeBWrLiGkgWkuCXg
@cerealskill
cerealskill / gist:1005b5d25b81584c3e4a42b61b37d850
Created April 20, 2018 23:52
Drivers Samsung RV410 - Wifi
https://es.ccm.net/forum/affich-1156633-samsung-rv410-controladora-red-wifi
https://es.ccm.net/download/descargar-23777-driver-de-red-wifi-para-samsung-rv410
@cerealskill
cerealskill / gist:66b94a74e702a3f91f5abd1e61795328
Last active April 2, 2018 21:03
leer_switches_ports_ravello.py
import json
import sys
from pprint import pprint
with open('api.json') as json_file:
json_data = json.load(json_file);
#json_data.close();
parse_json_switches_ports = json_data["design"]["network"]["switches"][5]["ports"];
@cerealskill
cerealskill / INSTALL_TypeScript_Sublime_Editor.sh
Last active January 24, 2018 19:50
Install Plugin TypeScript Sublime Editor MACOSX-Windows
#!/bin/bash
# from https://github.com/Microsoft/TypeScript-Sublime-Plugin
# Macosx
cd ~/"Library/Application Support/Sublime Text 3/Packages"
git clone --depth 1 https://github.com/Microsoft/TypeScript-Sublime-Plugin.git TypeScript
# For Windows Machine
# cd "%APPDATA%\Sublime Text 3\Packages"
# git clone --depth 1 https://github.com/Microsoft/TypeScript-Sublime-Plugin.git TypeScript
@cerealskill
cerealskill / execute_api_REST.ps1
Last active December 26, 2017 19:22
POWERSHELL Execute a call to a API REST endpoint
Write-Output "Ejecutando actualizarTerminoGiro en Desarrollo..."
Invoke-RestMethod "http://sccnlp3-br-des.azurewebsites.net/api/administracion/actualizarTerminoGiro"