change mtu size

MTU means maximum transmission unit. The default value is 1500 for Ethernet, which is also the standard for the Internet. If your application or network requires a different MTU size, you can set the MTU size by running the following commands. # Edit ifcfg-eth0 vi /etc/sysconfig/network-scripts/ifcfg-eth0 #Add MTU, settings: MTU="1460" # Save and close the file. Restart networking: service network restart

November 26, 2019 · 1 min · ulysses

aws ecr pushpull policy

Amazon Elastic Container Registry (ECR) is a fully-managed Docker container registry that makes it easy for developers to store, manage, and deploy Docker container images. Here’s the AWS IAM policy to push and pull images from Docker within ECR. { "Version": "2008-10-17", "Statement": [ { "Sid": "AllowPushPull", "Effect": "Allow", "Resource": [ "arn:aws:iam::*:role/your-custom-role" ], "Action": [ "ecr:GetDownloadUrlForLayer", "ecr:BatchGetImage", "ecr:BatchCheckLayerAvailability", "ecr:PutImage", "ecr:InitiateLayerUpload", "ecr:UploadLayerPart", "ecr:CompleteLayerUpload" ] } ] }

November 19, 2019 · 1 min · ulysses

tail a file in windows server

Linux has tail command. What about Windows? You can use Powershell to tail a file. Get-Content myLog.log –Wait

November 19, 2019 · 1 min · ulysses

gcp change instance type

Here’s how to change instance types via the command line # Set Project gcloud config set project your-project-id # Change instance type to 2 CPU 20GB memory. gcloud compute instances set-machine-type your-server-name \ --zone us-east1-a \ --machine-type n2-custom-2-20480 # Change instance type to original settings. gcloud compute instances set-machine-type your-server-name \ --zone us-east1-a \ --machine-type n2-custom-2-15360

November 18, 2019 · 1 min · ulysses

passive ftp firewall

Passive FTP is a FTP mode that alleviates the issues with client firewalls. The client initiates a call to the server. The return traffic is allowed as long as the client has initiated it. In addition, the server sends a port command along with an ephemeral port that the client can connect to. The client initiates a call on that ephemeral port, and the connection is then established. Egress port 21 and ephemeral ports 1024-65535 needs to be opened from the client side. ...

November 18, 2019 · 1 min · ulysses

aws efs describe mount targets

Here’s how to display mount targets of an EFS system via AWS CLI. aws efs describe-mount-targets \ --file-system-id fs-xxxxxxxx \ --profile default \ --region us-east-1

November 4, 2019 · 1 min · ulysses

bash history with timestamps

If you need to see Bash history with timestamps, use this command. HISTTIMEFORMAT="%d/%m/%y %T " To make it permanent, add it to your .bashrc. echo 'HISTTIMEFORMAT="%d/%m/%y %T "' >> ~/.bashrc source ~/.bashrc Timestamps accuracy is retroactively, meaning it will not be accurate for commands performed prior to the history time format being set.

October 31, 2019 · 1 min · ulysses

excel delete blank rows

Here’s how to delete blank rows in Excel.

October 31, 2019 · 1 min · ulysses

tar commands

Here are two important tar commands on how to create and extract a tar.gz file. Create a tar gzip file called “project.tar.gz” of a directory called “foo.” tar -cvzf project.tar.gz foo Untar the “project.tar.gz” file to a directory called bar. tar -xvzf project.tar.gz bar

October 30, 2019 · 1 min · ulysses

ffmpeg with start time

This is a follow up to a previous post about FFMPEG. In addition to sending a RTMP stream, you can also set a start time and duration. Here’s how to set the start time using -ss option and -to for the duration. Video will start at 1 min 23 secs and play until 2 mins. ffmpeg -ss 00:01:23 -i video.mp4 -to 00:02:00 -c copy -copyts cut.mp4 Here’s how to start time to start the video at 1 min 23 sec for RTMP streaming. Please note, the start time option needs to be before the input file. ...

October 29, 2019 · 1 min · ulysses