1604152380
Before jumping into making a plan for scaling your application, ask yourself what attracts your user now more than ever before?
No! Not the discounts or free offers.
It’s the flawless experience that draws more and more users’ attention that leads to conversion.
Rather than playing the “wait and watch” game, now is the right time to scale up your application. As the demand grows, it should be able to handle multiple requests and an increase in user traffic.
There has been a significant surge in the use of e-commerce apps, online learning software, video conferencing tools, virtual tutoring, or language apps since the outbreak of COVID-19 around the world. Many of the web and mobile offerings were not prepared for this sudden increase in user traffic and faced performance and scalability issues.
In this blog, we will explore the various ways and means to scale applications effectively.
Say, your application runs on one server and that can no longer sustain the current load. We recommend adding an extra server or servers to handle the required amount of throughput for your application.
To evenly distribute traffic across the servers, we use load balancers.
There are various methods that a load balancer can route traffic between the servers. One of them is round robin, which sends requests to the servers on a cyclical basis.
For example, if we have 3 servers, then it would send the first request to server 1, the second request to server 2, the third request to server 3, and so on. However, the most efficient method is when the load balancer would send the request only if the server can handle it.
This is how we increase request processing capacity by deploying more server instances on load-balanced computing resources.
But what if this load balancer dies out? Then we would not have a backup!
To overcome this issue, we can set up two or three load balancers where one would be actively routing the traffic and the others would be backup.
The load balancers can be a tangible piece of hardware, or they can simply be software in one of the servers. The cloud services are rampantly available, making it a relatively cheap and easy way to establish a load balancer.
#ai
1627083300
In this video, I’m presenting some awesome PhpStorm tips by my friend Christoph, who doesn’t even know that I’m shooting this video about his work :)
#phpstorm #tips & tricks #phpstorm tips & tricks
1619522210
First impression is the last impression. This statement is absolutely correct when we talk about web design and development. In this blog, let us talk about the tips for a great web web app.
Web application development has come a long way since the beginning of the World Wide Web. The web environment today uses HTML and CSS to view data and content to users while JavaScript is used to interact with the client.
Did you know that when a visitor arrives on your website, you have about five seconds (or less) to capture their attention and keep them where they are? That’s not a whole lot of time to impress someone, so if your load time is not perfect or your site’s navigation is all over the place, you can say goodbye to your visitors.
Believe it or not, the rapidly changing world of technology is not helping with this, either. New trends can easily make your website outdated and render it all but useless, leaving you with fewer visitors than you started with.
So, now the below questions arise:
How are you supposed to fix this issue and keep your visitors?
How do you create a website that looks good, functions perfectly, and communicates your message clearly?
Developers and designers have various approaches to improve web design. Regardless of whether you have a perfect, smooth, and proficient site, that doesn’t mean it will suitable always.
You ought to consistently consider site improvement thoughts as time passes by.
Read the full blog here
#web-design-tips #web-designing-tips #website-design-tips #website-designing-tips #web-development-tips
1595750136
Cool CSS box-shadow Example and Hover Effects | Quick CSS Tips, Tricks
#css #tips #tricks
1596656100
Following the previous Docker article, this tutorial will discuss how to save a Docker container into a new image, remove a container, and run an Nginx web server inside a container.
1. In this example, we will run and save an Ubuntu-based Docker container where the Nginx server will be installed. But before committing any changes to a container, first start the container with the below commands which updates and installs Nginx daemon into Ubuntu image:
# docker run ubuntu bash -c "apt-get -y update"
# docker run ubuntu bash -c "apt-get -y install nginx"
Install Nginx on Ubuntu Docker Container
If you get error ‘E: Unable to locate package nginx‘, then you need to connect to a container with interactive CLI and install nginx as shown.
# docker run -it ubuntu bash
# apt install nginx
# exit
2. Next, after Nginx package is installed, issue the command docker ps -l
to get the ID or name of the running container.
# docker ps -l
And apply changes by running the below command:
# docker commit 5976e4ae287c ubuntu-nginx
Here, 5976e4ae287c
represents the container ID
and ubuntu-nginx
represents the name of the new image that has been saved with committed changes.
In order to view if the new image has been successfully created just run docker images
command and a listing of all saved images will be shown.
# docker images
Chances are that the installation process inside the container finishes fast which leads to a non-running container (container is stopped). In this case the docker ps
command won’t show any output because no container is running.
In order to be able to still get the container’s id run docker ps -a | head -3
to output the most recent containers and identify the container based on the command issued to create the container and the exited status.
#centos #docker #nginx #redhat #virtualization #centos tips #docker tips #nginx tips #rhel tips #virtualization
1649408100
Collection of
git-tips
, want to add your tips? Checkout contributing.md
P.S: All these commands are tested on git version 2.7.4 (Apple Git-66)
.
master
branch.gitignore
.
git help everyday
git help -g
git log -S'<a term in the source>'
git log -p <file_name>
git filter-branch --force --index-filter 'git rm --cached --ignore-unmatch <path-to-your-file>' --prune-empty --tag-name-filter cat -- --all && git push origin --force --all
git fetch origin && git reset --hard origin/master && git clean -f -d
git ls-tree --name-only -r <commit-ish>
git update-ref -d HEAD
git reset --keep <commit>
git diff --name-only --diff-filter=U
git diff-tree --no-commit-id --name-only -r <commit-ish>
git diff
git diff --cached
Alternatives:
git diff --staged
git diff HEAD
git branch --merged master
git checkout -
Alternatives:
git checkout @{-1}
git branch --merged master | grep -v '^\*' | xargs -n 1 git branch -d
Alternatives:
git branch --merged master | grep -v '^\*\| master' | xargs -n 1 git branch -d # will not delete master if master is not checked out
git branch -vv
git branch -u origin/mybranch
git branch -d <local_branchname>
git push origin --delete <remote_branchname>
Alternatives:
git push origin :<remote_branchname>
git branch -dr <remote/branch>
git tag <tag-name>
git tag -d <tag-name>
git push origin :refs/tags/<tag-name>
git checkout -- <file_name>
git revert <commit-ish>
git reset <commit-ish>
git commit -v --amend
git cherry -v master
git commit --amend --author='Author Name <email@address.com>'
git commit --amend --reset-author --no-edit
git remote set-url origin <URL>
git remote
Alternatives:
git remote show
git branch -a
git branch -r
git add -p
curl -L http://git.io/vfhol > ~/.git-completion.bash && echo '[ -f ~/.git-completion.bash ] && . ~/.git-completion.bash' >> ~/.bashrc
git log --no-merges --raw --since='2 weeks ago'
Alternatives:
git whatchanged --since='2 weeks ago'
git log --no-merges --stat --reverse master..
git checkout <branch-name> && git cherry-pick <commit-ish>
git branch -a --contains <commit-ish>
Alternatives:
git branch --contains <commit-ish>
git config --global alias.<handle> <command>
git config --global alias.st status
git stash
Alternatives:
git stash push
git stash -k
Alternatives:
git stash --keep-index
git stash push --keep-index
git stash -u
Alternatives:
git stash push -u
git stash push --include-untracked
git stash push -m <message>
Alternatives:
git stash push --message <message>
git stash -a
Alternatives:
git stash --all
git stash push --all
git stash list
git stash show -p <stash@{n}>
git stash apply <stash@{n}>
git stash pop
Alternatives:
git stash apply stash@{0} && git stash drop stash@{0}
git stash clear
Alternatives:
git stash drop <stash@{n}>
git checkout <stash@{n}> -- <file_path>
Alternatives:
git checkout stash@{0} -- <file_path>
git ls-files -t
git ls-files --others
git ls-files --others -i --exclude-standard
git worktree add -b <branch-name> <path> <start-point>
git worktree add --detach <path> HEAD
git rm --cached <file_path>
Alternatives:
git rm --cached -r <directory_path>
git clean -n
git clean -f
git clean -f -d
git submodule foreach git pull
Alternatives:
git submodule update --init --recursive
git submodule update --remote
git cherry -v master
Alternatives:
git cherry -v master <branch-to-be-merged>
git branch -m <new-branch-name>
Alternatives:
git branch -m [<old-branch-name>] <new-branch-name>
git rebase master feature && git checkout master && git merge -
master
branchgit archive master --format=zip --output=master.zip
git add --all && git commit --amend --no-edit
git fetch -p
Alternatives:
git remote prune origin
git branch -vv | grep ': gone]' | awk '{print <!-- @doxie.inject start -->}' | xargs git branch -D
git rev-list --reverse HEAD | head -1
Alternatives:
git rev-list --max-parents=0 HEAD
git log --pretty=oneline | tail -1 | cut -c 1-40
git log --pretty=oneline --reverse | head -1 | cut -c 1-40
git log --pretty=oneline --graph --decorate --all
Alternatives:
gitk --all
git log --graph --pretty=format:'%C(auto) %h | %s | %an | %ar%d'
git log --graph --decorate --oneline $(git rev-list --walk-reflogs --all)
git subtree push --prefix subfolder_name origin gh-pages
git subtree add --prefix=<directory_name>/<project_name> --squash git@github.com:<username>/<project_name>.git master
git subtree pull --prefix=<directory_name>/<project_name> --squash git@github.com:<username>/<project_name>.git master
git bundle create <file> <branch-name>
git clone repo.bundle <repo-dir> -b <branch-name>
git rev-parse --abbrev-ref HEAD
git update-index --assume-unchanged Changelog; git commit -a; git update-index --no-assume-unchanged Changelog
git rebase --autostash
git fetch origin pull/<id>/head:<branch-name>
Alternatives:
git pull origin pull/<id>/head:<branch-name>
git describe --tags --abbrev=0
git diff --word-diff
git difftool [-t <tool>] <commit1> <commit2> <path>
git update-index --assume-unchanged <file_name>
git update-index --no-assume-unchanged <file_name>
.gitignore
.git clean -X -f
git checkout <deleting_commit> -- <file_path>
git checkout <commit-ish> -- <file_path>
git config --global pull.rebase true
Alternatives:
#git < 1.7.9
git config --global branch.autosetuprebase always
git config --list
git config --global core.ignorecase false
git config --global core.editor '$EDITOR'
git config --global help.autocorrect 1
git name-rev --name-only <SHA-1>
git clean -fd --dry-run
git commit --fixup <SHA-1>
git rebase -i --autosquash
git commit --only <file_path>
git add -i
git check-ignore *
git status --ignored
git log Branch1 ^Branch2
git log -<n>
Alternatives:
git log -n <n>
git config --global rerere.enabled 1
git diff --name-only | uniq | xargs $EDITOR
git count-objects --human-readable
git gc --prune=now --aggressive
git instaweb [--local] [--httpd=<httpd>] [--port=<port>] [--browser=<browser>]
git log --show-signature
git config --global --unset <entry-name>
git checkout --orphan <branch_name>
git show <branch_name>:<file_name>
git log --first-parent
git rebase --interactive HEAD~2
git checkout master && git branch --no-merged
git bisect start # Search start
git bisect bad # Set point to bad commit
git bisect good v2.6.13-rc2 # Set point to good commit|tag
git bisect bad # Say current state is bad
git bisect good # Say current state is good
git bisect reset # Finish search
git commit --no-verify
git log --follow -p -- <file_path>
git clone -b <branch-name> --single-branch https://github.com/user/repo.git
git checkout -b <branch-name>
Alternatives:
git branch <branch-name> && git checkout <branch-name>
git switch -c <branch-name>
git config core.fileMode false
git config --global color.ui false
git config --global <specific command e.g branch, diff> <true, false or always>
git for-each-ref --sort=-committerdate --format='%(refname:short)' refs/heads/
git grep --heading --line-number 'foo bar'
git clone https://github.com/user/repo.git --depth 1
git log --all --grep='<given-text>'
git log --oneline master..<branch-name> | tail -1
Alternatives:
git log --reverse master..<branch-name> | head -6
git reset HEAD <file-name>
git push -f <remote-name> <branch-name>
git remote add <remote-nickname> <remote-url>
git remote -v
git blame <file-name>
git shortlog
git push --force-with-lease <remote-name> <branch-name>
git log --author='_Your_Name_Here_' --pretty=tformat: --numstat | gawk '{ add += <!-- @doxie.inject start -->; subs += <!-- @doxie.inject end -->; loc += <!-- @doxie.inject start --> - <!-- @doxie.inject end --> } END { printf "added lines: %s removed lines: %s total lines: %s
", add, subs, loc }' -
Alternatives:
git log --author='_Your_Name_Here_' --pretty=tformat: --numstat | awk '{ add += <!-- @doxie.inject start -->; subs += <!-- @doxie.inject end -->; loc += <!-- @doxie.inject start --> - <!-- @doxie.inject end --> } END { printf "added lines: %s, removed lines: %s, total lines: %s
", add, subs, loc }' - # on Mac OSX
git revert -m 1 <commit-ish>
git rev-list --count <branch-name>
git config --global alias.undo '!f() { git reset --hard $(git rev-parse --abbrev-ref HEAD)@{${1-1}}; }; f'
git notes add -m 'Note on the previous commit....'
git log --show-notes='*'
git --git-dir=<source-dir>/.git format-patch -k -1 --stdout <SHA1> | git am -3 -k
git fetch origin master:refs/remotes/origin/mymaster
git merge-base <branch-name> <other-branch-name>
git log --branches --not --remotes
Alternatives:
git log @{u}..
git cherry -v
git diff --ignore-all-space | git apply --cached
git config [--global] --edit
git blame -L <start>,<end>
git var -l | <variable>
git format-patch -M upstream..topic
git rev-parse --show-toplevel
git log --since='FEB 1 2017' --until='FEB 14 2017'
git log --perl-regexp --author='^((?!excluded-author-regex).*)
git request-pull v1.0 https://git.ko.xz/project master:for-linus
git ls-remote git://git.kernel.org/pub/scm/git/git.git
git ls-files --others -i --exclude-standard | xargs zip untracked.zip
git config -l | grep alias | sed 's/^alias\.//g'
Alternatives:
git config -l | grep alias | cut -d '.' -f 2
git status --short --branch
git checkout master@{yesterday}
git push origin HEAD
git push -u origin <branch_name>
git rebase --onto <new_base> <old_base>
git config --global url.'git@github.com:'.insteadOf 'https://github.com/'
cd <path-to-submodule>
git pull origin <branch>
cd <root-of-your-main-project>
git add <path-to-submodule>
git commit -m "submodule updated"
git config --global core.autocrlf false
English | 中文 | Русский | 한국어 | Tiếng Việt | 日本語 | नेपाली | Polski | فارسی
Author: Git-tips
Source Code: https://github.com/git-tips/tips
License: MIT License