This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://rachelbythebay.com/w/2020/03/07/costly/ | |
https://blog.clubhouse.com/reining-in-the-thundering-herd-with-django-and-gunicorn/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo strace -s 4096 -f $( ps ax |grep gunicorn|grep -v grep|cut -d'?' -f1|while read p; do echo "-p $p" ; done|tr '\n' ' ' ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const dgram = require('dgram'); | |
const message = new Buffer('Server?'); | |
const socket = dgram.createSocket('udp4'); | |
socket.on('listening', function () { | |
socket.setBroadcast(true); | |
setInterval(() => { | |
socket.send(message, 0, message.length, 5555, '255.255.255.255'); | |
}, 5000); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ history |grep docker|awk -F' ' '{ for (i=2;i<NF;i++) printf " " $i; print " "$NF }'|grep -v history |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git config --global --add oh-my-zsh.hide-dirty 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
awk -F' ' '{ print $(NF - 1)}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mcedit ~/.zshrc | |
export CAPACITOR_ANDROID_STUDIO_PATH='/var/lib/flatpak/app/com.google.AndroidStudio/current/active/files/extra/android-studio/bin/studio.sh' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$q->where(function (QueryExpression $exp, Query $q) { | |
return $q->func()->ifnull(["Foo.type NOT IN ('Bar', 'Baz')" => 'identifier', 'true' => 'identifier']); | |
}); | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
export SSH_AUTH_SOCK=$HOME/.ssh/ssh-agent.$(hostname).sock | |
env |grep -q "^DISPLAY=" | |
if [ $? -ne 0 ] ; then | |
export DISPLAY=:0 | |
fi | |
pidof ssh-agent >/dev/null 2>&1 | |
DONTSTOREMEHERE="PECO" | |
if [ $? -ne 0 ]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -L $(curl -Ls https://api.github.com/repos/VSCodium/vscodium/releases/latest | jq -c '.assets|map(select(.browser_download_url | contains("_amd64.deb")))|.[0].browser_download_url'|tr -d '"') --output /tmp/codium.deb && sudo dpkg -i /tmp/codium.deb |