How to find process by using port?
sudo lsof -i:80
Today's Document

Discoholic 🪩
No title available

Andulka

Janaina Medeiros
cherry valley forever
Three Goblin Art
taylor price
Peter Solarz
Cosimo Galluzzi

roma★

if i look back, i am lost
tumblr dot com

★
AnasAbdin
No title available

No title available

No title available
sheepfilms
will byers stan first human second

seen from United Kingdom

seen from United Kingdom

seen from Japan
seen from Türkiye
seen from United States

seen from United States
seen from United States
seen from France

seen from China
seen from Germany
seen from Malaysia
seen from United States

seen from Netherlands

seen from France
seen from United States
seen from Malaysia

seen from United Kingdom
seen from United States

seen from Netherlands

seen from Ukraine
@pearcode
How to find process by using port?
sudo lsof -i:80
How to remove duplicates from file using vim?
:sort u
How to debug/dump Doctrine objects?
\Doctrine\Common\Util\Debug::dump($value);
How to remove local/remote branch in git?
git branch -d local_branch
git push origin :remote_branch
How to use many ssh keys?
In ~/.ssh/config add:
Host myhost.com RSAAuthentication yes IdentityFile ~/my-ssh-key-directory/my-private-key-filename User myusername
How to replace text in many files?
sed -i 's/old-word/new-word/g' *.txt
How to get real IP in Varnish?
Add in vcl_recv:
if (req.http.x-forwarded-for) { set req.http.X-Forwarded-For = req.http.X-Forwarded-For + ", " + client.ip; } else { set req.http.X-Forwarded-For = client.ip; }
How to archive git repository
git archive --format zip --output /full/path/to/zipfile.zip master
Symfony2 /run/shm permissions
sudo setfacl -dR -m u::rwX /run/shm
Automatic word wrapping in VIM
:set textwidth=72 Press keys gggqG to apply the new text width to the whole buffer: - gg means : go to the beginning of buffer - gq means : reformat the text included in the motion - G means : go to the end of the buffer
Varnish hit-for-pass explanation
A hit_for_pass object is made to optimize the fetch procedure against a backend server.
For ordinary cache misses, Varnish will queue all clients requesting the same cache object and send a single request to the backend. This is usually quickest, let the backend work on a single request instead of swamping it with n requests at the same time.
Remember that some backends use a lot of time preparing an object; 10 seconds is not uncommon. If this is the front page HTML and you have 3000 req/s against it, sending just one backend request makes very much sense.
The issue arises when after Varnish has fetched the object sees that it can't be cached. Reasons for this can be that the backend sends "Cache-Control: max-age=0", or (more often) a Set-Cookie header. In this case you have somewhere between 3000 and 30000 clients (3k req/s * 10sec) sitting idle in queue, and for each of these clients the same slow one-at-the-time backend request must complete to serve them. This will ruin your site response time.
So Varnish saves the decision that this request can not be cached by creating a hit_for_pass object.
On the next request for the same URL, the cache lookup will return a hit_for_pass object. This signals that multiple fetches may be done at the same time. Your backend might not be too happy about it, but at least Varnish isn't queuing the clients for no reason.
Source
PHP Design Patterns
How to push task into resque?
redis-cli RPUSH resque:queue:hello '{"class": "Hello", "args": ["World"]}'
cv - Linux tool to show progress for cp, rm, dd, ...
beeswithmachineguns - A utility for arming (creating) many bees (micro EC2 instances) to attack (load test) targets (web applications).