Skip to content

Instantly share code, notes, and snippets.

View ramitsurana's full-sized avatar

Ramit Surana ramitsurana

View GitHub Profile
@ramitsurana
ramitsurana / jenkins-aws-docker.sh
Last active March 27, 2018 16:15
Setting up jenkins,docker and git pipeline
## Install Jenkins
$ sudo yum update
$ sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat-stable/jenkins.repo
$ sudo rpm --import http://pkg.jenkins-ci.org/redhat-stable/jenkins-ci.org.key
$ sudo yum install jenkins
$ sudo service jenkins start
$ sudo chkconfig jenkins on
## Install Docker (Amazon EC2 Container Service)
@ramitsurana
ramitsurana / default.toml
Last active January 16, 2018 08:59
Habitat sample files
# Default.toml
port = 8090
important_message = 'RUN NOW!!'
@ramitsurana
ramitsurana / tree.py
Last active March 25, 2018 13:49
Tree Description and Nodes Formation
from anytree import Node, RenderTree
import json
parent_node = Node('/')
print ("$ <Starting your application....>")
def get_input(input_cmd = input("$")):
#find length of input command. if length is 1 -> ls, pwd; if length = 2 cd </home/user>, makdir qwerty
length = len(input_cmd.split())
@ramitsurana
ramitsurana / frontend-ws-connection.ts
Created April 23, 2023 16:44 — forked from jsdevtom/frontend-ws-connection.ts
kubernetes-ingress websockets with nodejs
export const ws = webSocket<WebsocketMessage>(`wss://${location.hostname}:${location.protocol === 'https:' ? 443 : 80}/ws/`);
export const wsObserver = ws
.pipe(
retryWhen(errors =>
errors.pipe(
delay(1000)
)
)
);