This file contains hidden or 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 socket | |
import sys | |
def get_constants(prefix): | |
"""Create a dictionary mapping socket module constants to their names.""" | |
return dict((getattr(socket, n), n) | |
for n in dir(socket) | |
if n.startswith(prefix) | |
) |
This file contains hidden or 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
#!/usr/bin/env python3.6 | |
# coding: utf-8 | |
""" | |
Çok Satırlı yorum: | |
Python Guido Van Rossum tarafından 90'ların başında geliştirilmeye | |
başlanmıştır. | |
""" | |
# Bu da bir tek satırlık yorum örneğidir. |
This file contains hidden or 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 | |
# Delete all containers | |
docker rm $(docker ps -a -q) | |
# Delete all images | |
docker rmi $(docker images -q) |
This file contains hidden or 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
web: | |
restart: always | |
build: ./web | |
expose: | |
- "8000" | |
links: | |
- postgres:postgres | |
- redis:redis | |
volumes: | |
- /usr/src/app |
This file contains hidden or 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
# Add Environment Variables | |
SECRET_KEY=5(15ds+i2+%ik6z&!yer+ga9m=e%jcqiz_5wszg)r-z!2--b2d | |
DB_NAME=djangoproject | |
DB_USER=admin | |
DB_PASS=adminpass | |
DB_SERVICE=postgres | |
DB_PORT=5432 |
This file contains hidden or 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
nano ~/.bash_profile | |
export PS1="\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]\$ " | |
export CLICOLOR=1 | |
export LSCOLORS=ExFxBxDxCxegedabagacad | |
alias ls='ls -GFh' |
This file contains hidden or 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
apt-get install --reinstall locales && sudo dpkg-reconfigure locales | |
nano ~/.bashrc | |
export LANG=tr_TR.UTF-8 | |
export LANGUAGE=tr |
This file contains hidden or 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 docker run -d --restart=unless-stopped -p 8080:8080 rancher/server |
This file contains hidden or 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
[0] 1.3.6.1.2.1.1.1. sysDescr | |
[1] 1.3.6.1.2.1.1.2. sysObjectID | |
[2] 1.3.6.1.2.1.1.3. sysUpTime | |
[3] 1.3.6.1.2.1.1.4. sysContact | |
[4] 1.3.6.1.2.1.1.5. sysName | |
[5] 1.3.6.1.2.1.1.6. sysLocation | |
[6] 1.3.6.1.2.1.1.7. sysServices | |
[7] 1.3.6.1.2.1.2.1. ifNumber | |
[8] 1.3.6.1.2.1.2.2.1.1. ifIndex | |
[9] 1.3.6.1.2.1.2.2.1.2. ifDescr |
This file contains hidden or 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
# Çekilen Veriler | |
FIELDS = ["ifNumber", "ifIndex", "ifDescr", "ifType", "ifMtu", "ifSpeed", "ifPhysAddress", "ifAdminStatus", | |
"ifOperStatus", "ifLastChange", | |
"ifLastChange", "ifInOctets", "ifInUcastPkts", "ifInNUcastPkts", "ifInDiscards", "ifInErrors", "ifOutOctets", | |
"ifOutUcastPkts", | |
"ifOutNUcastPkts", "ifOutDiscards", "ifOutErrors", "ifOutQLen", "ifSpecific", "ifName", "ifInMulticastPkts", | |
"ifInBroadcastPkts", ] | |
# Başlangıç |