Skip to content

Instantly share code, notes, and snippets.

View arttuladhar's full-sized avatar

Aayush Tuladhar arttuladhar

View GitHub Profile
@arttuladhar
arttuladhar / send_email.sh
Created July 3, 2018 00:41
Sending Email via Linux Command Line Prompt
echo "This is the body" | mail -s "This is the subject" user@gmail.com

Docker Pull with Compose File

docker-compose --file file.yml pull

Docker Up with Compose File

docker-compose --file file.yml up
@arttuladhar
arttuladhar / .bash_alias_me
Last active May 29, 2018 19:22
Must have bash aliases to make your life bit easier
# confirmation
alias mv='mv -i'
alias cp='cp -i'
alias ln='ln -i'
# Brew shortcuts
alias update='brew update'
alias upgrade='brew upgrade'
alias services='brew services list'
alias start='brew services start'
@arttuladhar
arttuladhar / jsonParser.md
Created March 26, 2018 20:00
Convert JSON String to JSON Object

Convert JSON String to json Object

JSONParser parser = new JSONParser();
JSONObject json = (JSONObject) parser.parse(stringToParse);
@arttuladhar
arttuladhar / basics_kubectl.sh
Last active October 8, 2021 17:58
Getting Started with Kubernetes
# Install KubeCtl
brew install kubectl
# Starting Minikube
minikube start
# Run Hello World
kubectl run hello-world --replicas=2 \
--labels="run=load-balancer-example" \
--image=gcr.io/google-samples/node-hello:1.0 \
@arttuladhar
arttuladhar / grep_example.md
Last active October 20, 2017 15:59
GREP Examples

Find Files With Match Keywords

grep -lr "search keyword" *

grep -r "search keyword" <files>
@arttuladhar
arttuladhar / neo-cypher.md
Last active June 15, 2017 17:32
Neo4j Cypher Queries

Using Match

MATCH(P:Promotion) return P LIMIT 10
MATCH(P:Promotion) WHERE id(P) = 155073835 return P limit 10


MATCH (C:Pyramid) WHERE ID(C) = 173883128 RETURN C LIMIT 10
@arttuladhar
arttuladhar / GebDemoSpec.groovy
Created June 12, 2017 22:06
REST API Testing Using Spock
package specs
import geb.spock.GebReportingSpec
class GebDemoSpec extends GebReportingSpec {
def "Testing Basic Page Contents"(){
setup:
go "http://localhost:9000/#/demo/geb-demo"
@arttuladhar
arttuladhar / kafka-cheatsheet.sh
Last active June 8, 2017 16:10
Kafka CheatSheet
## Listing Topics
./kafka-topics --list --zookeeper localhost:2181
## Create Topic
./kafka-topics --create --topic pin-promotions-data-local --zookeeper localhost:2181 --partitions 1 --replication-factor 1
@arttuladhar
arttuladhar / python_control_statements.py
Last active June 7, 2017 16:11
Python Fundamentals
# ********************************************************************
# Control Statements
# ********************************************************************
num = 20
### IF Statement
if num == 20:
print 'The Number is 20'
else: