Skip to content

Instantly share code, notes, and snippets.

View saurabhariyan's full-sized avatar
😜
non ducor duco!

Saurabh Ariyan saurabhariyan

😜
non ducor duco!
  • New Delhi
View GitHub Profile
version: '3.8'
services:
postgres:
container_name: container-pg
image: postgres
hostname: localhost
ports:
- "5432:5432"
environment:
POSTGRES_USER: admin
# sdkman helps in managing and installing different micronaut versions
curl -s "https://get.sdkman.io" | bash
sdk install micronaut
# micronaut cli will open in interactive mode.
mn
brew install openjdk@17
sudo ln -sfn /usr/local/opt/openjdk@17/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk-17.jdk
javahome() {
unset JAVA_HOME
export JAVA_HOME=$(/usr/libexec/java_home -v "$1");
java -version
}
# alias j1.8='javahome 1.8'
# alias j11='javahome 11'
alias j17='javahome 17'
code --install-extension aaron-bond.better-comments
code --install-extension batisteo.vscode-django
code --install-extension bradymholt.pgformatter
code --install-extension CoenraadS.bracket-pair-colorizer
code --install-extension DotJoshJohnson.xml
code --install-extension eamodio.gitlens
code --install-extension emilast.LogFileHighlighter
code --install-extension Equinusocio.vsc-community-material-theme
code --install-extension Equinusocio.vsc-material-theme
code --install-extension esbenp.prettier-vscode
[supervisord]
nodaemon=true
logfile=supervisord.log
[supervisorctl]
[inet_http_server]
port = 127.0.0.1:9001
[rpcinterface:supervisor]
@saurabhariyan
saurabhariyan / flexbox.24
Created October 31, 2018 13:55
Flexbox froggy Solutions
flex-flow:column-reverse wrap-reverse;
justify-content:center;
align-content:space-between;

import pandas as pd import json from pymongo import MongoClient

def _connect_mongo(): """ A util for making a connection to mongo """ // if username and password: mongo_uri = '' #% (username, password, host, port, db) #add mongo uri conn = MongoClient(mongo_uri)

@saurabhariyan
saurabhariyan / addKeyPair.md
Last active October 5, 2018 17:00
AWS ELB Setup

Create a key-pair and then attach it to Elastic Beanstalk environment.

  • Steps to create a key-pair

    • Login to AWS
    • Services -> EC2
    • In left under NETWORK & SECURITY select key pairs
    • Select Create new Key Pair, type key name and click on create. The key will be automatically downloaded to your system.
    • Steps to attach created key pair to Elastic Beanstalk environment
  • AWS -> Services -> Elastic Beanstalk

@saurabhariyan
saurabhariyan / newSetup.sh
Created May 1, 2018 08:52
```Ubuntu set up for web dev```
#!/bin/bash
# Git
#sudo apt-get -y install git
# Node.js
sudo apt-get -y install nodejs
sudo apt-get -y install npm
sudo ln -s /usr/bin/nodejs /usr/bin/node