Skip to content

Instantly share code, notes, and snippets.

@kyamasam
kyamasam / ssh-without-full-command.md
Created September 12, 2024 13:47
How to automate login into ssh with single command

How to SSH into server without typing the full command

1. open your console profile

eg im using Zsh

nano ~/.zshrc

If you are using bash try:

@kyamasam
kyamasam / replace_wordpress_url.md
Last active September 12, 2024 13:48
Script To Replace Old and New Url in Wordpress SQL

Use the following script to replace your old wordpress url with a new one after migration

Step 1

Replace https://youroldurl.com with your actual url of the old site Replace https://yournewurl.com with your actual url of the new site

Note: Ensure you use the correct scheme (https or http)

Step 2

Simulate the query on PHP MyAdmin to have an idea of what the query will do

@kyamasam
kyamasam / nginx.conf
Last active March 25, 2025 09:13
How to enable gzip compression in vue js
# Ever wondered how to increase the load times for your vue js pages?
# Below is a guide for how to reduce load times for your vue js app using gzip compression and nginx server
# /etc/nginx.conf
gzip on;
gzip_static on;
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
gzip_proxied any;
gzip_vary on;
@kyamasam
kyamasam / styling.css
Last active July 12, 2019 06:55
Better Styling For Dbiagram.io app
Add the User Javascript And Css Extension to your Chrome Browser.
https://chrome.google.com/webstore/detail/user-javascript-and-css/nbhcbdghjpllgmfilhnhkllmkecfmpld?hl=en
On The CSS tab add the code bellow
@-webkit-keyframes spinAround{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes spinAround{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.loading-overlay{bottom:0;left:0;position:absolute;right:0;top:0;-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:none;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;overflow:hidden;z-index:1}.loading-overlay.is-active{display:-webkit-box;display:-ms-flexbox;display:flex}.loading-overlay.is-full-page{z-index:999;position:fixed}.loading-overlay.is-full-page .loading-icon:after{top:calc(50% - 2.5em);left:calc(50% - 2.5em);width:5em;height:5em}.loading-overlay .loading-