Skip to content

Instantly share code, notes, and snippets.

View sd031's full-sized avatar
🧠
Youtube @learnTechWithSandip

Sandip Das sd031

🧠
Youtube @learnTechWithSandip
View GitHub Profile
@sd031
sd031 / gist:bbeff9f940a26ecc10ed1c6aedd23184
Created November 23, 2023 14:02
go installation in ubuntu
update outdated software packages:
apt update
Setting up Go on Ubuntu:
apt install golang-go -y
Test the Setup:
go version
@sd031
sd031 / automate-deployment-using-python.py
Created November 15, 2023 02:11
Python script to automate the deployment of a web application to a server.
#pip install gitpython paramiko
import paramiko
from git import Repo
# Configuration
git_repo_url = 'https://github.com/yourusername/your-repo.git'
local_repo_dir = '/path/to/local/repo'
remote_server_ip = 'your.server.ip'
ssh_user = 'your_ssh_username'
Open Terminal.
List the current configured remote repository for your fork.
$ git remote -v
> origin https://github.com/YOUR_USERNAME/YOUR_FORK.git (fetch)
> origin https://github.com/YOUR_USERNAME/YOUR_FORK.git (push)
Specify a new remote upstream repository that will be synced with the fork.
$ git remote add upstream https://github.com/ORIGINAL_OWNER/ORIGINAL_REPOSITORY.git
Verify the new upstream repository you've specified for your fork.
$ git remote -v
> origin https://github.com/YOUR_USERNAME/YOUR_FORK.git (fetch)
$ aws configure --profile project_name_1
$ aws configure --profile project_name_2
or can edit the : ~/.aws/credentials file directly
and when doing any service call, mention profile name at the end like this:
aws s3 ls --profile project_name_1
If you are going to work on a particular project for long and will not make any switches, it's better to set the profile as default:
e.g. export AWS_DEFAULT_PROFILE=project_name_2
@sd031
sd031 / nodefix
Created May 29, 2020 12:45
Legecy Node.js project dependency installation
Try
CXXFLAGS="-mmacosx-version-min=10.9" LDFLAGS="-mmacosx-version-min=10.9" npm i
https://stackoverflow.com/questions/52545166/node-6-node-gyp-rebuild-for-hiredis-fails-on-macos
It works for me, Mac OS 10.14.1 (18B75), node version 6.11.3 (legacy project)
@sd031
sd031 / AWS + DevOps Free courses on Udemy
Last active February 20, 2021 11:49
AWS and DevOps related courses available for 🆓 FREE 🆓 on udemy.
AWS and DevOps related courses available for 🆓 FREE 🆓 on udemy.
--> https://docs.google.com/document/d/1BEdrhZrTd-iY61HJ_JS5Y3ExTWtytUnHFR9EYf1ODdU/edit?usp=sharing
@sd031
sd031 / install_sam_cli.sh
Created September 24, 2019 02:22 — forked from wongcyrus/install_sam_cli.sh
Install AWS SAM CLI in Cloud9
sudo yum update -y
pip3 install awscli --upgrade --user
sudo ln -s /bin/touch /usr/bin/touch
yes | sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)"
test -d ~/.linuxbrew && eval $(~/.linuxbrew/bin/brew shellenv)
test -d /home/linuxbrew/.linuxbrew && eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)
test -r ~/.bash_profile && echo "eval \$($(brew --prefix)/bin/brew shellenv)" >>~/.bash_profile
echo "eval \$($(brew --prefix)/bin/brew shellenv)" >>~/.profile
brew upgrade
brew update
@sd031
sd031 / DevOps related courses with links
Created September 12, 2019 04:14
GCP, AWS Certification, DevOps / DevSecOps courses link that I did go through
@sd031
sd031 / Good Courses For Full Stack JavaScript Developers with Interest in Cloud Technologies
Created September 11, 2019 18:17
Good Courses For Full Stack JavaScript Developers with Interest in Cloud Technologies
For JavaScript:
JavaScript Essential Training: https://www.linkedin.com/learning/javascript-essential-training-3/welcome
javaScript Good parts: https://frontendmasters.com/courses/good-parts-javascript-web/
Deep javaScript Foundation: https://frontendmasters.com/courses/deep-javascript-v3/
Back-end Node.js Development:
Node.js Essential Training: https://www.linkedin.com/learning/node-js-essential-training-3/learn-the-node-js-fundamentals
Advance Node.js: https://www.linkedin.com/learning/advanced-node-js/welcome
Front-end:
@sd031
sd031 / Learn Linux Basics | part 5: Shell Scripting functions
Last active March 26, 2022 14:44
Learn Linux Basics | part 5: Shell Scripting functions
Funtions:
Writing Functions:
Normal function:
get_name() {
echo "John"
}
echo "You are $(get_name)"