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
pip install twine setuptools | |
python setup.py sdist build | |
twine upload dist/* |
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
cat /proc/cpuinfo | grep processor | wc -l |
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
grep -rn print . |
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 apt-get install postgresql-contrib | |
# in /etc/postgresql/9.1/main/postgresql.conf | |
shared_preload_libraries = 'pg_stat_statements' | |
custom_variable_classes = 'pg_stat_statements' | |
pg_stat_statements.max = 100 | |
pg_stat_statements.track = top | |
pg_stat_statements.save = off |
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
import pip | |
from subprocess import call | |
for dist in pip.get_installed_distributions(): | |
call("pip install --upgrade " + dist.project_name, shell=True) |
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
ALL | |
All messages in the mailbox; the default initial key for | |
ANDing. | |
ANSWERED | |
Messages with the \Answered flag set. | |
BCC | |
Messages that contain the specified string in the envelope | |
structure's BCC field. |
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 kill -9 `sudo fuser -n tcp 8000 2> /dev/null` |
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
# List all images | |
docker images | |
docker run -i -t <image:tag> <command> | |
# Lists all changes | |
docker ps -l | |
# Commits the last change | |
docker commit <image_id> <image:tag> |
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
from amonagent.plugin import AmonPlugin | |
class MyCustomPlugin(AmonPlugin): | |
def collect(self): | |
""" | |
The agent collects and sends all the metrics defined in this function | |
""" | |
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
├── amonagent | |
│ ├── plugins | |
│ │ ├── apache | |
│ │ │ ├── apache.conf.example | |
│ │ │ ├── apache.py | |
│ │ │ ├── README.md | |
│ │ │ └── requirements.txt | |
│ └── plugins-enabled | |
│ └── apache.conf |
OlderNewer