This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#KAFKA ALIAS TO BE USED INSIDE DOCKER | |
export KAFKA_HOME=/opt/kafka | |
export BROKER="172.17.0.1:32768" | |
export BOOTSTRAP="172.17.0.1:32768" | |
export ZK="172.17.0.1:2181" | |
alias k-list-topics="$KAFKA_HOME/bin/kafka-topics.sh --list --zookeeper $ZK" | |
alias k-create-topic="$KAFKA_HOME/bin/kafka-topics.sh --create --zookeeper $ZK --replication-factor 1 --partitions 3 --topic" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
##################################################### | |
# Name: Bash CheatSheet for Mac OSX | |
# | |
# A little overlook of the Bash basics | |
# | |
# Usage: | |
# | |
# Author: J. Le Coupanec | |
# Date: 2014/11/04 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
############################# | |
# | |
# Auto Install Drupal on Debian/Ubuntu boxes | |
# Author: ricardo amaro | |
# https://drupal.org/user/666176 | |
# | |
# License: http://www.gnu.org/licenses/gpl-2.0.html | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Arrays; | |
import java.util.Scanner; | |
class MergeSort { | |
private static Scanner sc; | |
public static void main(String args[]) { | |
sc = new Scanner(System.in); | |
System.out.println("Enter no of terms"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Reference http://stackoverflow.com/a/18490935/2037928 | |
# Login as root | |
# Install needed packages | |
apt-get -y install build-essential zlib1g-dev libssl-dev libreadline6-dev libyaml-dev | |
cd /tmp | |
# Download appropriate ruby version https://www.ruby-lang.org/en/downloads/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
""" | |
This script is forked originally from Dave Jeffery. The original implementation | |
was very slow and deleted around 2 tweets per second. Making it multithreaded I | |
am able to delete 30-50 tweets per second. | |
@author: vik-y | |
---------------------------------------------------------------------------- | |
This script will delete all of the tweets in the specified account. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
from itertools import combinations | |
import math | |
import copy | |
def euclid(a, b): | |
"""returns the Greatest Common Divisor of a and b""" | |
a = abs(a) | |
b = abs(b) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console | |
//tes |