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
PUT 192.168.99.100:8500/v1/agent/service/register | |
{ | |
"name": "mysql_slave", | |
"tags": ["master"], | |
"address": "78.140.191.241", | |
"port": 3306, | |
"enableTagOverride": false | |
} |
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
/* | |
* author Huber Flores | |
*/ | |
# Install on each Node | |
$ su | |
# Perl Templating-Toolkit and the Gnu plotting utility to create HTML and graphical reports with the result data set. | |
$ apt-get install gnuplot-nox libtemplate-perl libhtml-template-perl libhtml-template-expr-perl |
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 | |
# A script to build Django from the given SVN revision | |
REV=$1 | |
UPLOAD_TO=locum:www/pypi | |
pushd . | |
svn co -r $REV http://code.djangoproject.com/svn/django/trunk/ django-$REV | |
cd django-$REV |
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
module LightDaemon | |
class Daemon | |
DEFAULT_PID_FILE = "/tmp/light_daemon.pid" | |
class << self | |
def start(obj, options={}) | |
@options = self.parse_options(options) | |
@pid_file = @options[:pid_file] | |
if self.get_pid() |
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
# coding: utf-8 | |
import unittest | |
""" | |
Есть два списка разной длины. В первом содержатся ключи, а во втором значения. Напишите функцию, которая создаёт из этих ключей и значений словарь. Если ключу не хватило значения, в словаре должно быть значение None. Значения, которым не хватило ключей, нужно игнорировать. Подробнее: http://company.yandex.ru/job/vacancies/dev_python_mysql.xml | |
""" | |
def dictFromKeyAndValue(key, value): | |
return dict(zip(key, value)) if (len(key) <= len(value)) else dict(map(None, key, value)) |