Skip to content

Instantly share code, notes, and snippets.

@jcaristy
jcaristy / .git...HEAD
Created March 15, 2023 23:38
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.18+commit.87f61d96.js&optimize=false&runs=200&gist=
ref: refs/heads/main
@jcaristy
jcaristy / info.md
Last active March 7, 2018 04:51
[LINUX] Montar un disco nuevo en Azure #linux
@jcaristy
jcaristy / info.nd
Created March 5, 2018 04:08
[rancher] update rancher #rancher
# Para correr Portainer con Data Local
docker run -d -p 9000:9000 --restart always -v /var/run/docker.sock:/var/run/docker.sock -v /data-portainer:/data portainer/portainer
docker run -d -v /data/rancher-mysql:/var/lib/mysql -p 8080:8080 -p 80:8080 --restart=unless-stopped rancher/server:latest
@jcaristy
jcaristy / install.sh
Created November 23, 2017 17:26
[UBUNTU - Instalar LAMP] #ubuntu #linux #LAMP
# Deshabilitar el firewall
sudo ufw status verbose
sudo ufw disable
# Instalar Apache
sudo apt -get install apache2
# Buscar paquetes actuales de mysql
sudo apt-cache search mysql | grep mysql | more
@jcaristy
jcaristy / info.sh
Last active January 30, 2018 05:06
[DREMIO: Instalar dremio] #dremio
Estos pasos son para instalar Dremio en Ubuntu
### Primero instalamos jre
sudo apt-get update
sudo apt-get install default-jre
https://www.digitalocean.com/community/tutorials/instalar-java-en-ubuntu-con-apt-get-es
#LINKS DE INSTALACION
@jcaristy
jcaristy / info.md
Last active October 2, 2017 14:07
[Ubuntu: Crontab Reboot] #linux #ubuntu

Editamos el crontab

sudo crontab -e

Agregamos la siguiente linea

0 6 * * * /sbin/shutdown -r now

// Reiniciamos todos los dias a las 4am. Hora del servidor

Obtenemos la hora del servidor

date

@jcaristy
jcaristy / info.sh
Last active September 27, 2017 17:39
[Mac: Ocultar/Mostrar archivos ocultos] #mac
# Mostrar
defaults write com.apple.finder AppleShowAllFiles YES
killall Finder /System/Library/CoreServices/Finder.app
# Ocultar
defaults write com.apple.finder AppleShowAllFiles NO
killall Finder /System/Library/CoreServices/Finder.app
@jcaristy
jcaristy / info.md
Created September 25, 2017 02:06
[AWS: Glue] #aws
@jcaristy
jcaristy / leer-csv.py
Last active September 24, 2017 15:25
[PySpark: Leer un CSV] #pyspark
# Listar en databricks el archivo
%fs ls dbfs:/databricks-datasets/online_retail/data-001/
# En databricks ya esta inicializado el objeto SparkSession pero sino se puede inicializar asi
from pyspark.sql import SparkSession
spark = SparkSession.builder.master("local").appName("Word Count").config("spark.some.config.option", "some-value").getOrCreate()
# Leer CSV a un RDD
path = "dbfs:/databricks-datasets/online_retail/data-001/data.csv"
data = spark.read.csv(path)
@jcaristy
jcaristy / info.md
Last active September 24, 2017 14:39
[Databricks: Comandos] #python #pyspark

Listar los archivos

%fs ls

Nota: %fs = Funciones del sistema (%file-system)