Skip to content

Instantly share code, notes, and snippets.

View vik-y's full-sized avatar

Vikas Yadav vik-y

View GitHub Profile
@vik-y
vik-y / aliases-kafka.sh
Last active April 22, 2021 16:18 — forked from diegoicosta/aliases-kafka.sh
Aliases useful for working with kafka
#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"
@vik-y
vik-y / bash-cheatsheet.sh
Last active March 3, 2023 00:13 — forked from LeCoupa/bash-cheatsheet.sh
Bash CheatSheet for UNIX Systems
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04
@vik-y
vik-y / d7install.bash
Created November 23, 2017 07:49 — forked from ricardoamaro/d7install.bash
Drupal Installation Script for Linux Debian/Ubuntu
#!/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
#
@vik-y
vik-y / MergeSort.java
Last active August 21, 2016 18:33 — forked from jayeshsolanki93/MergeSort.java
MergeSort in Java
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");
@vik-y
vik-y / update-ruby.sh
Created November 21, 2015 11:05 — forked from scmx/upgrade-install-ruby-2-1-2-ubuntu-12-04.md
Upgrade/Install ruby 2.1.2 #ubuntu #12.04 #14.04
# 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/
@vik-y
vik-y / delete_all_tweets.py
Last active September 22, 2023 21:04 — forked from davej/delete_all_tweets.py
This script will delete all of the tweets in a specified account.
# -*- 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.
@vik-y
vik-y / RSA.py
Last active August 29, 2015 14:22 — forked from avalonalex/RSA.py
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)
@vik-y
vik-y / 0_reuse_code.js
Last active August 29, 2015 14:17
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
//tes