Skip to content

Instantly share code, notes, and snippets.

View ilacorda's full-sized avatar
🏠
Working from home

ilacorda

🏠
Working from home
View GitHub Profile
git reset --hard origin/{branchName}
@ilacorda
ilacorda / Hadoop_install_osx.md
Created January 24, 2020 11:18 — forked from viecode09/Hadoop_install_osx.md
This is how to install hadoop on Mac OS

STEP 1: First Install HomeBrew, download it from http://brew.sh

$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

STEP 2: Install Hadoop

$ brew search hadoop
$ brew install hadoop
@ilacorda
ilacorda / pip3Mac.bash
Created June 1, 2019 21:33
Installing pip3 on Mac
#Install Python 3
brew install python3
#pip is installed alongside python 3
#Running brew install pip3 will return: No available formula with the name "pip3"
@ilacorda
ilacorda / git-config-commands.bash
Created February 14, 2019 10:51
Some git config commands
#Show all git config
git config --list
#Set your username
git config --local user.name= booboo
#Set your email address
git config --local user.email= booboo@boo.com
#Use a specific editor
git config --global core.editor "vim"~
@ilacorda
ilacorda / decorate.bash
Created February 12, 2019 09:45
Log and decorate - Git
git log --oneline --decorate --all --graph
@ilacorda
ilacorda / delete_topic.bash
Created October 17, 2018 19:40
Delete a topic in Kafka
kafka-topics.sh --delete --zookeeper localhost:2181 --topic my_topic
@ilacorda
ilacorda / filesizeM.bash
Created September 26, 2018 19:26
Show file size in Megabyte
ls -l --block-size=M
@ilacorda
ilacorda / kafka_topic_creation.sh
Created September 16, 2018 22:04
Create a Kafka topic from command line
kafka-topics --create --topic atopic --zookeeper localhost:2181 --partitions 1 --replication-factor 1
@ilacorda
ilacorda / kafka-command.md
Created September 15, 2018 12:38 — forked from pkafel/kafka-command.md
Kafka command-line tools (examples in OSX)

Kafka command line tools

List (not complete)

  • zookeeper-server-start.sh - starting Zookeeper
  • kafka-server-start.sh - start Kafka
  • kafka-topics.sh - manage topics in Kafka
  • kafka-console-producer.sh - script for sending messages to Kafka topic
  • kafka-console-consumer.sh - script for consuming messages from Kafka topic
  • kafka-run-class.sh - script for running different tools (list of tools can be found here)
@ilacorda
ilacorda / functions.php
Last active September 5, 2018 14:52
Turn off Wordpress Gutenberg editor for your custom post types
add_filter( ‘gutenberg_can_edit_post_type’, ‘can_edit_post_types’ );
function can_edit_post_types( $can_edit, $post_type ) {
If ( in_array( $post_type, array( ‘a_post_type’, ‘another_post_type’ ) ) {
return false;
}
return $can_edit;
}