Skip to content

Instantly share code, notes, and snippets.

View aedorado's full-sized avatar
🎯
Focusing

Anurag Sharma aedorado

🎯
Focusing
View GitHub Profile
@aedorado
aedorado / docker-compose.yml
Created December 6, 2020 16:24
Docker compose file for ELK 7.9.2
version: '3.7'
services:
elasticsearch:
image: elasticsearch:7.9.2
ports:
- '9200:9200'
environment:
- discovery.type=single-node
ulimits:
@aedorado
aedorado / docker-compose.yml
Created October 5, 2020 19:13
Setup ES and Kibana using Docker Compose
version: '3.7'
services:
elasticsearch:
image: elasticsearch:7.9.2
ports:
- '9200:9200'
environment:
- discovery.type=single-node
ulimits:
@aedorado
aedorado / docker-install.sh
Last active March 6, 2022 11:18
Install docker on Ubuntu 20.04 LTS
# Update packages list:
sudo apt update
# Prerequsites:
sudo apt install apt-transport-https ca-certificates curl software-properties-common
# Add the GPG key:
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
# Now add the docker reop
@aedorado
aedorado / Dijkstra.cpp
Created July 17, 2017 14:22
Dijkstra Algorithm in C++
// Time complexity : O(ElogV)
#include <bits/stdc++.h>
using namespace std;
typedef vector<int> vi;
typedef pair<int,int> pii;
typedef vector< pii > vii;
#define INF 0x3f3f3f3f
vii *G; // Graph
@aedorado
aedorado / prim.cpp
Created July 17, 2017 13:52
Prim MST in C++
#include <iostream>
#include <ctime>
#include <cstdio>
#include <cstdlib>
#define MIN(a, b) (((a) < (b)) ? (a) : (b))
#define INF 1000000
using namespace std;
$.each($('.organization-card__container'), function() {
console.log($(this).attr('aria-label').substring(17));
$(this).find('.organization-card')[0].click();
console.log($('.organization-card--detail').find('.organization-card__precis').text());
var lis = $('.organization__tag'); olist = [];
for (i = 0; i!=lis.length; i++) { olist.push(lis[i].innerHTML); }
console.log(olist.join());
console.log('\n')
});
@aedorado
aedorado / pdo.py
Created August 20, 2016 11:12
Generate bindParam statements for given sql query
import sys
s = "SELECT * FROM course_strucure WHERE program_id = :program_id AND year_of_joining = :year_of_joining AND sem_code_of_joining = :sem_code_of_joining"
s = sys.argv[1]
print ( "$sql = \"" + s + "\";" )
s = s.split()
s = [x for x in s if x[0]==':']