Let's run a
When you stop the container
To run an instance of
Voila! You are up & running we a totally working mysql server.
Let's check with netstat (on your HOST) whether it's up or not:
#docker #mysql #netstat #image #container
MySQL instance on our local machine using docker. You don't need to install any version of mysql on your system. You won't get into trouble of upgrading the mysql or even in the trouble of removing it.When you stop the container
Mysql will be stopped. If you remove the image it will be gone forever :)To run an instance of
mySQL on your system (server or desktop), just use the below command:docker run -p 3306:3306 --name some-mysql -e MYSQL_ROOT_PASSWORD=my-secret-pw -d mysql:latest
NOTE: we assume that docker is installed on your system.-p 3306:3306 will bind the container port into a port in host machine. We run it on 3306, if you have to change it you need to change the first port number to a port in your host like 3350:3306.--name gives a name to you container, so you can easily work with the name provided.-e will set an environment variable. Here we have set a password for our mysql root user.-d makes the container to be run in DAEMON mode (in background).mysql:latest this is the image name that you will pull from docker hub registry.Voila! You are up & running we a totally working mysql server.
Let's check with netstat (on your HOST) whether it's up or not:
root@infra:~# netstat -nltp | grep 3306
tcp6 0 0 :::3306 :::* LISTEN 11572/docker-proxy
#docker #mysql #netstat #image #container
How to check whether name servers (NS) are propagated in Domain Name Server (DNS)?
Occasionally sysadmins/devops migrate their server to a new server with a new IP address due to server lag/ data loss, you name it. Here our domain name will point to the old IP address. It sometimes take a couple of days to fully get propagated.
There are some network tools like
At prompt type your domain and hit enter:
If it resolves to what you expected then it works. It should give you something like:
Using dig:
It prints lots of information, you should see
If you see the correct IP address, it means that it has properly cached by remote name servers.
#sysadmin #nslookup #dig #ns #dns #name_server
Occasionally sysadmins/devops migrate their server to a new server with a new IP address due to server lag/ data loss, you name it. Here our domain name will point to the old IP address. It sometimes take a couple of days to fully get propagated.
There are some network tools like
nslookup`/`dig that can help in checking DNS propagation. Let's say your name server (NS) is ns1. example.com:nslookup - ns1-5-61-24-199.parsdev.net
At prompt type your domain and hit enter:
nillkin24.ir
If it resolves to what you expected then it works. It should give you something like:
Server: ns1-5-61-24-199.parsdev.net
Address: 5.61.24.199#53
NOTE: it may still take a while to propagate to the rest of the internet, that's out of your control.Using dig:
dig @ns1-5-61-24-199.parsdev.net nillkin24.ir
It prints lots of information, you should see
ANSWER SECTION with a result like below:;; ANSWER SECTION:
nillkin24.ir. 14400 IN A 5.61.24.199
If you see the correct IP address, it means that it has properly cached by remote name servers.
#sysadmin #nslookup #dig #ns #dns #name_server
Analytics services for django projects:
https://github.com/jcassee/django-analytical
#django #analytics #django_analytical #github
https://github.com/jcassee/django-analytical
#django #analytics #django_analytical #github
GitHub
GitHub - jazzband/django-analytical: Analytics services for Django projects
Analytics services for Django projects. Contribute to jazzband/django-analytical development by creating an account on GitHub.
You can integrate
Add to
In your templates, load the
* Reference: http://django-bootstrap4.readthedocs.io/en/latest/
#python #django #bootstrap #bootstrap4 #template django_bootstrap4
Django with Bootstrap4 now. First install it using pip:pip install django-bootstrap4
Add to
INSTALLED_APPS in your settings.py:'bootstrap4',
In your templates, load the
bootstrap4 library and use the bootstrap_* tags:{% load bootstrap4 %}
{# Display a form #}
<form action="/url/to/submit/" method="post" class="form">
{% csrf_token %}
{% bootstrap_form form %}
{% buttons %}
<button type="submit" class="btn btn-primary">Submit</button>
{% endbuttons %}
</form>* Reference: http://django-bootstrap4.readthedocs.io/en/latest/
#python #django #bootstrap #bootstrap4 #template django_bootstrap4
Forwarded from Digiato | دیجیاتو
🔵 حریم نه چندان خصوصی؛ چرا باید وبکم لپ تاپ را بپوشانیم؟
#امنیت #آموزش
👇
http://dgto.ir/rl7
📱 @Digiato 📡
#امنیت #آموزش
👇
http://dgto.ir/rl7
📱 @Digiato 📡
Axigen 10.1.5 Release UpdateWe are happy to announce the release of a new minor version, Axigen 10.1.5.
This version comes with number of small features, enhancements, performance improvements, and bug fixes, as well as support for openSUSE Leap 42.2 and 42.3.
For a detailed list of what's included in 10.1.5, please consult the list below.
More info: https://www.axigen.com/press/product-releases/axigen-1015-release-update_94.html
#mail #server #mail_server #axigen #update
Axigen
AXIGEN Press Room - Axigen 10.1.5 Release Update
Axigen is a fast, reliable and secure Linux, Windows, and Solaris mail server software, offering integrated SMTP, POP3, IMAP, and webmail servers, enabling the System Administrator to have full control of traffic through the email server.
Mixed Active Content is now blocked by default in Firefox 23!
When a user visits a page served over HTTP, their connection is open for eavesdropping and man-in-the-middle (MITM) attacks. When a user visits a page served over HTTPS, their connection with the web server is authenticated and encrypted with SSL and hence safeguarded from eavesdroppers and MITM attacks.
However, if an HTTPS page includes HTTP content, the HTTP portion can be read or modified by attackers, even though the main page is served over HTTPS. When an HTTPS page has HTTP content, we call that content “mixed”. The webpage that the user is visiting is only partially encrypted, since some of the content is retrieved unencrypted over HTTP. The Mixed Content Blocker blocks certain HTTP requests on HTTPS pages.
#http #https #mixed_active_content #firefox
What is Mixed Content?When a user visits a page served over HTTP, their connection is open for eavesdropping and man-in-the-middle (MITM) attacks. When a user visits a page served over HTTPS, their connection with the web server is authenticated and encrypted with SSL and hence safeguarded from eavesdroppers and MITM attacks.
However, if an HTTPS page includes HTTP content, the HTTP portion can be read or modified by attackers, even though the main page is served over HTTPS. When an HTTPS page has HTTP content, we call that content “mixed”. The webpage that the user is visiting is only partially encrypted, since some of the content is retrieved unencrypted over HTTP. The Mixed Content Blocker blocks certain HTTP requests on HTTPS pages.
#http #https #mixed_active_content #firefox
Django admin easy template:
https://github.com/ebertti/django-admin-easy
#python #django #template #admin_easy
https://github.com/ebertti/django-admin-easy
#python #django #template #admin_easy
There various tools for a web-based project management applications, but the one which is fantastic is
The similar version of
I could not find a mobile version for
- https://taskulu.com
- https://trello.com
#project_management #task_management #trello #taskulu
Trello with its ease of use and free of charge.The similar version of
Trello in Persian is Taskulu. It is also a great tool for project management.I could not find a mobile version for
Taskulu, but there are for Trello. Take a look at them both in the following links:- https://taskulu.com
- https://trello.com
#project_management #task_management #trello #taskulu
Taskulu
Taskulu | Task Management for Teams
Collaborative, simple task management that will improve your team’s productivity
sed linux command:sed stands for Stream Editor. As its name advertise it works on stream of text (input file, input pipleline).General command executation:
sed REGEX INPUTFILE
For instance if you want to replace
hi with bye in hibye.txt file:sed 's/hi/bye/' hibye.txt
It will print the result into standard output (console). If you want to put the output in a file:
sed 's/hi/bye/' hibye.txt > output.txt
Instead of
INPUTFILE we can put - which then reads from standard input:cat hibye.txt | sed 's/hi/bye/' -
Now if you want to put the output in a file:
cat hibye.txt | sed 's/hi/bye/' - > output.txt
As until now you have seen,
sed command writes output to standard output, if you want to write the result to the file itself, use -i as below:sed -i 's/hi/bye' hibye.txt
So in the above command the result will be written to
hibye.txt itself.#linux #sed #regex
Tech C**P
#python #django #django_part11 #views #render
In this tutorial we would go over rendering templates by using shortcuts and using dynamic urls in views. We also complete the detail function to load question details from database.
#django_part11
#django_part11
جلسه ۵۰ گروه کاربران پایتون تهران، فردا پنجشنبه ۹ آذر ۱۳۹۶ از ساعت ۱۴:۳۰ تا ۱۶:۰۰ در «شتابدهندهٔ آواتک» به نشانی «جاده مخصوص کرج، جنب متروی بیمه، خط کندرو، بین کوچه بیمه 2 و بیمه 3، پلاک 31، (محل سابق کارخانه الکترودسازی آما) کارخانه نوآوری، آواتک» برگزار خواهد شد.
شرکت در این رویداد برای کلیه علاقمندان، آزاد و رایگان است.
#python #tehpug #meetup
شرکت در این رویداد برای کلیه علاقمندان، آزاد و رایگان است.
#python #tehpug #meetup
Tech C**P
Oreilly.Production-Ready.Microservices.1491965975.epub
About the author Susan Fowler is a site reliability engineer at
Uber Technologies, where she splits her time between running a production-readiness initiative across all Uber microservices and embedding within business-critical teams to bring their services to a production-ready state. She worked on application platforms and infrastructure at several small startups before joining Uber.Export all collection documents in
#mongodb #export #mongoexport #mongodump #collection #database
MongoDB to a JSON file:mongoexport --db YOUR_DATABASE --collection YOUR_COLLECTION_NAME --out YOUR_OUTPUT_FILE_NAME.json
NOTE: do not use this command for full database backup! Use mongodump instead#mongodb #export #mongoexport #mongodump #collection #database
Install
Prepare for compilation:
By default, htop will be installed under
build and install
Voila! You're done. just run it using:
#linux #centos #htop #compile #source #install
htop on CentOS from source:htop is a real-time process viewer for Linux. First, install prerequisites and download the source:yum groupinstall "Development Tools"
yum install ncurses-devel
wget http://hisham.hm/htop/releases/2.0.2/htop-2.0.2.tar.gz
tar xvfvz htop-2.0.2.tar.gz
cd htop-2.0.2/
Prepare for compilation:
./configure
By default, htop will be installed under
/usr/local/bin. If you want to change installation location to something else (e.g., /usr/ bin`), run configure script with `--prefix option instead. For example:./configure --prefix=/usr
build and install
htop as follows:make
make install
Voila! You're done. just run it using:
htop
#linux #centos #htop #compile #source #install