Monday, May 18, 2020
Saturday, May 16, 2020
Thursday, May 14, 2020
Wednesday, May 13, 2020
Monday, May 11, 2020
how to add iam user in aws
1. User name
2. Access type - select "AWS Management Console access"
3. Console password - Custom password
4. Uncheck - Require password reset
5. Select "Attach existing policies directly"
aws delete an s3 bucket
unable to delete s3 bucket
Login as root user. (Not as any IAM user you might have specified)
Go to the S3 console.
Click on the bucket you want to delete.
Under the "Permissions" tab click on "Bucket Policy"
Click on "Delete"
https://stackoverflow.com/questions/45693897/unable-to-delete-s3-bucket/55721584
Login as root user. (Not as any IAM user you might have specified)
Go to the S3 console.
Click on the bucket you want to delete.
Under the "Permissions" tab click on "Bucket Policy"
Click on "Delete"
https://stackoverflow.com/questions/45693897/unable-to-delete-s3-bucket/55721584
Wednesday, April 29, 2020
Tuesday, April 28, 2020
Saturday, April 25, 2020
Friday, April 24, 2020
Saturday, April 18, 2020
How to install Golang in Linux
sudo apt-get update
sudo apt-get -y upgrade
cd /tmp
wget https://dl.google.com/go/go1.14.2.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.14.2.linux-amd64.tar.gz
open ~/.profile and add below variable at the end
export GOROOT=/usr/local/go
export GOPATH=$HOME/go
export PATH=$GOPATH/bin:$GOROOT/bin:$PATH
update current shell session
source ~/.profile
sudo apt-get -y upgrade
cd /tmp
wget https://dl.google.com/go/go1.14.2.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.14.2.linux-amd64.tar.gz
open ~/.profile and add below variable at the end
export GOROOT=/usr/local/go
export GOPATH=$HOME/go
export PATH=$GOPATH/bin:$GOROOT/bin:$PATH
update current shell session
source ~/.profile
go version
write hello.go
package main
import "fmt"
func main() {
fmt.Printf("hello, world\n")
}
build
go build hello.go
run
./hello
Friday, April 17, 2020
pathogen.vim nerdtree
mkdir -p ~/.vim/autoload ~/.vim/bundle
curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim
add in .vimrc
execute pathogen#infect()
add in .vimrc
syntax on
filetype plugin indent on
git clone https://github.com/preservim/nerdtree.git ~/.vim/bundle/nerdtree
reference:
https://github.com/tpope/vim-pathogen
git clone https://github.com/preservim/nerdtree.git ~/.vim/bundle/nerdtree
reference:
https://github.com/tpope/vim-pathogen
Monday, April 13, 2020
VBoxManage.exe: error: Call to WHvSetupPartition failed: ERROR_SUCCESS

It's possible 13/04/2020 :)
bcdedit /set hypervisorlaunchtype off
and make sure Hyper-V and Windows Sandbox are disabled in Windows Features (which you can get to by entering
OptionalFeatures.exe at a command prompt, or via the Control Panel).
Also, Virtualisation options should be enabled in the BIOS, and I think (I don't have time to test right now) that "Virtual Machine Platform" and "Windows Hypervisor Platform" should be enabled.
VirtualBox 6.0.14, Windows Version 10.0.18362.356.
https://stackoverflow.com/questions/58031941/how-to-get-oracle-vm-virtualbox-6-0-and-wsl-working-at-the-same-timeThursday, February 13, 2020
How to install Jekyll
sudo apt-get install ruby-full
sudo apt-get install rubygems build-essential
sudo apt-get install gcc
sudo apt-get install make
sudo gem install jekyll bundler
all the above commands are not working and I don't know why ????
Luckily I found this solution
jekyll new blog
cd blog
bundle exec jekyll serve
EUREKA!!!
Friday, January 3, 2020
running simple django application in aws
By default, only SSH has been enabled in the security for the fresh server in AWS

Change the security group



Add another rule for port 8000

Viola

Installing Supervisor
sudo apt-get install -y supervisor
in /etc/supervisor/conf.d create gunicorn.conf file
sudo mkdir /var/log/gunicorn
sudo supervisorctl reread
sudo supervisorctl update
sudo supervisorctl status
in /etc/nginx/sites-available create django-simple.conf file

sudo nginx -t
sudo ln django-simple.conf /etc/nginx/sites-enabled/
static files and image were not loaded properly

add this line

sudo systemctl nginx reload
creating new python environment using venv
sudo apt-get install python3-venv
python3 -m venv env
apt-get install python3-venv
python3 -m venv env
apt-get install python3-venv
create new key pair
when creating AMI, you have option to select existing key pair or create a new one
after creating the AMI, the key name value is showing in the list
when you encounter this problem, just reference this link https://unix.stackexchange.com/questions/115838/what-is-the-right-file-permission-for-a-pem-file-to-ssh-and-scp
Sunday, December 29, 2019
aws
solution on connecting ssh
https://unix.stackexchange.com/questions/115838/what-is-the-right-file-permission-for-a-pem-file-to-ssh-and-scp
fix the security problem in ec2
sudo yum update
before:
aws-cli/1.16.102 Python/2.7.16 Linux/4.14.138-89.102.amzn1.x86_64 botocore/1.12.92
sudo pip install --upgrade awscli
after:
aws-cli/1.16.309 Python/2.7.16 Linux/4.14.138-89.102.amzn1.x86_64 botocore/1.13.45
commands
aws iam list-users
aws iam create-user --user-name Lynard
aws iam list-policies
aws iam attach-user-policy --user-name Lynard --policy-arn arn:aws:iam::aws:policy/AdministratorAccess
aws iam list-attached-user-policies --user-name Lynard
aws iam add-user-to-group --user-name Lynard --group-name Marketing
aws iam get-group --group-name Marketing
aws iam remove-user-from-group --user-name Lynard --group-name Marketing
aws iam detach-user-policy --user-name Lynard --policy-arn arn:aws:iam::aws:policy/AdministratorAccess
aws iam delete-user --user-name Lynard
groups
aws iam create-group --group-name Accounting
aws iam attach-group-policy --policy-arn arn:aws:iam::aws:policy/AmazonDynamoDBFullAccess --group-name Accounting
aws iam list-attached-group-policies --group-name Accounting
aws iam detach-group-policy --group-name Accounting --policy-arn arn:aws:iam::aws:policy/AmazonDynamoDBFullAccess
aws iam delete-group --group-name Accounting
aws iam list-groups
Subscribe to:
Posts (Atom)
free online comma separating tool
https://delim.co/#




