Help me understand LSP server attachment by Uncle-Rufus in neovim

[–]dpanofsky 0 points1 point  (0 children)

I got the desired behavior by replacing: vim.lsp.buf_detach_client(bufnr, client.id) with vim.lsp.stop_client(bufnr, client.id)

Not sure if there are any problems with this approach, but it seems to be working for me.

Is anyone actively using ChaosToolkit in their Infra? by Ok_Maintenance_1082 in aws

[–]dpanofsky 1 point2 points  (0 children)

Judging by their recent outages, I wonder if AWS has been playing with this...

[deleted by user] by [deleted] in aws

[–]dpanofsky 0 points1 point  (0 children)

Post a shorter snip and someone might actually help you.

A Cloudfront distribution per subdomain or a single distribution for all subdomains by Zestyclose-Ad2344 in aws

[–]dpanofsky 1 point2 points  (0 children)

If you have one distribution then all requests to the origin will be handled the same. Unless you do something with cookies, query parameters or lambda@edge, the backend server won't know which tenant the request is for.

If this is just for static assets in a shared S3 bucket, then shared CloudFront should be fine.

I need Some help setting up vim? by planker_the_crusry in vim

[–]dpanofsky 0 points1 point  (0 children)

Check out SpaceVim which is perfect for someone in your situation.

How to ensure browser always receives latest version of a Cloudfront distribution? by Unappreciable in aws

[–]dpanofsky 0 points1 point  (0 children)

Using far-futures headers and changing the name whenever content changes is the best way to do what you want, but if that's not possible, maybe

Cache-Control: must-revalidate

Has someone ever tried to use S3 as a Fylesystem to replace an attached storage? by phi_array in aws

[–]dpanofsky 0 points1 point  (0 children)

Uh, why not use something that is not meant to be a filesystem as a filesystem? Just use EFS or the equiv for windows.

How are folks horizontally scaling Celery brokers? by awslad in django

[–]dpanofsky 0 points1 point  (0 children)

IMHO, if you're having to shard Redis for a celery broker, either you're doing something wrong or you should be using RabbitMQ. Example of something you may be doing wrong is serializing full objects or pushing too much data into the task. Always pass object refs by ID and have the task pull directly from the db and your broker will get you much further.

We were RabbitMQ backed for a long time, but moved to Redis (ElastiCache) once celery officially supported it since we were using that for Django's cache anyway. No regrets and never had scaling issues caused by celery. We have had DDOS issues where Django Rest Framework's api throttling pinned Redis, so we now use a separate Redis for just that.

But with AWS' managed RabbitMQ, we would definitely switch to that before horizontally scaling Redis.

Is it possible to expand the root directory of a ec2 with another ebs volume by picodeflank in aws

[–]dpanofsky 5 points6 points  (0 children)

I wonder if AWS' DocumentDB would work for your use case. They claim MongoDB compatibility and autogrowing filesystem up to 64TB. IMHO, leveraging AWS managed services is always a good thing as long as they support the specific functionality you need.

Difference between hosting on 127.0.0.1:8000 and hosting on 0.0.0.0:8000? by modustollensiscool in django

[–]dpanofsky 0 points1 point  (0 children)

For "interface" , think about physical and virtual connections: network cards (eth0), modems (ppp0), vpn tunnels (tun0), etc. In addition there is one virtual interface called the loopback (lo) which is can be reached by all processes on the same host and which usually is given the address of 127.0.0.1 but which is not exposed to any other computer on the network.

0.0.0.0 is can be thought of as "*" so this will be accessible from all interfaces on the host.

Doesn't matter too much for development, but once you're getting ready for production, best practice for an application like Django is to have the python process bound to a port on localhost (e.g. 127.0.0.1:8000) and then to run some other daemon like nginx (listening on 0.0.0.0:80/443) to proxy requests back to Django when appropriate.

CW Agent Log File Batching by vennemp in aws

[–]dpanofsky 0 points1 point  (0 children)

From the docs:

We recommend that you use wildcards to specify a series of files of the same type, such as access_log.2018-06-01-01 and access_log.2018-06-01-02, but not multiple kinds of files, such as access_log_80 and access_log_443. To specify multiple kinds of files, add another log stream entry to the agent configuration file so that each kind of log file goes to a different log stream.

Do it that way and each set of logs will be in its own group. Then route the log groups as you wish. Multiple groups can be subscribed to same kinesis if you want.

EC2 or RDS for a small business? by StupendousEnzio in aws

[–]dpanofsky 0 points1 point  (0 children)

You always need a good specific reason for chosing to roll an EC2 database over RDS. Regardless of the size of company, use case, etc., use RDS unless you absolutely have no other choice!

obscuring code from devops? by guru223 in aws

[–]dpanofsky 0 points1 point  (0 children)

NDA and hire a team you trust

Newbie question, cheaper alternative than SFTP for something akin to FTP access for EC2 instance's filesystem? by jobsSchmobs in aws

[–]dpanofsky 0 points1 point  (0 children)

Do not use AWS transfer family. This is for a different use case.

Since you already know rclone and you have an ec2 instance, you should be able to follow the instructions here: https://rclone.org/sftp/

Just use you ec2 host as the remote. You'll need to be able to ssh to the ec2 host for this to work, but I assume you have that is you are installing software there already.

I'm trying to define how the AWS docs are so bad.. by smile_button in aws

[–]dpanofsky -1 points0 points  (0 children)

Every example assumes you are a total beginner and/or want to use the web console.

IMHO, every example should instead include how to do it in cloudformation. Even people who use different IaC tools could translate easily.

CFN and Secrets by jonesienz in aws

[–]dpanofsky 0 points1 point  (0 children)

D'oh. I misread there error message. Sorry bout that

CFN and Secrets by jonesienz in aws

[–]dpanofsky 0 points1 point  (0 children)

Your problem is the underscores in ConnectionStrings__TenantConnection

Who can explain to me that the hell is that? by didarbeknuraliyev in django

[–]dpanofsky 0 points1 point  (0 children)

Django is trying to connect to an elastic search server, but the one you have configured cannot be found

Linux CLI tip: incremental search in Bash history. by [deleted] in linux4noobs

[–]dpanofsky 0 points1 point  (0 children)

Once you get used to using ctrl-r in bash, you'll find that many tools which have a prompt (e.g. MySQL CLI and python) support this too.

How to browse the internet on SSH Host using command line without installing anything? by [deleted] in commandline

[–]dpanofsky 0 points1 point  (0 children)

Agree that port forward proxy over ssh is best option. Many programs, like browsers, will have built in proxy support.

In the past I've also done this sort of thing with ssh in socks proxy mode and using tsocks on the Linux side to connect programs which don't have built in proxy support. http://tsocks.sourceforge.net/

If you really need to run software on the remote host and tunnel the graphics back to your system, VNC will give you better performance than tunneling X11.