09 Oct 2017
|
amazon
AWS S3 policy generator
What for ?
The AWS Policy Generator is a tool that enables you to create policies that control access to Amazon Web Services (AWS) products and resources. “
Enables to specify fine-grained rules for all the actions to be performed on resources.
How ?
- Specify your rules
- Click
Add statement
- Repeat 1 + 2 until satisfaction
- Click
Generate policy
- Copy-paste the JSON to your bucket authorization strategy ( MY-BUCKET > Authorizations > Bucket Strategy )
- Save, and voilà !
Examples
Note that the Sid can be changed but needs to be unique. This can be useful to describe a policy
Denying bucket deletion to everyone
{
"Id": "Policy1507xxxxxxx",
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Stmt150xxxxxxx",
"Action": [
"s3:DeleteBucket"
],
"Effect": "Deny",
"Resource": "arn:aws:s3:::MY-BUCKET/",
"Principal": "*"
}
]
}
Static hosting without public listing
{
"Id": "Policy1507xxxxx",
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Stmt150xxxxxxxx",
"Action": [
"s3:GetObject"
],
"Effect": "Allow",
"Resource": "arn:aws:s3:::MY-BUCKET/",
"Principal": "*"
}
]
}
18 Sep 2017
|
vim
neovim
Intro
Nvim is asynchronous and multicore. Already enough to consider it a way to go…
Migration from vim to nvim
Start by reading some stuff there :help nvim-from-vim
. The following will describe the main steps :
- Installing Neavim with python support :
sudo add-apt-repository ppa:neovim-ppa/stable
sudo apt-get install neovim
sudo apt-get install python-neovim # Or "pip2 install neovim"
sudo apt-get install python3-neovim # Or "pip3 install neovim"
- You will create an init file for neovim that links everything to a classic vim configuration. In
~/.config/nvim/init.vim
add the following lines :
set runtimepath+=~/.vim,~/.vim/after
set packpath+=~/.vim
source ~/.vimrc
-
Use Plug to install packages. Get the file plug.vim and copy it to ~/.vim/autoload/plug.vim
. Inside nvim, you can now use :Plug...
commands. Check the (#usefull-plugins) section for a basic plugins setup.
- Create the right alias by putting in your
~/.bashrc
: alias vim=nvim
Usefull plugins
Ressources
21 Aug 2017
|
javascript
Useful repo to see what JS (and to a lesser degree backend) frameworks look like in real world use cases.
It collects implementation in various framework of a medium.com clone, and tries to show good practice for projects organization using the said framework. This is not intended to be used to learn a framework, but to improve your knowledge of it by showing examples of real world use that go beyond the simple todo app that most tutorials present.
https://github.com/gothinkster/realworld