simple code hiligter

Тестовый пост, проверка плагна Simple code highlighter

HTML:

<head>
	<title></title>
</head>
<body>

<div id="post-666" class="post post-666 type-post status-publish format-standard hentry category-upwork-networking">
<h2 class="entry-title">Internet Security Test 2016</h2>						<div class="post-content">
<p><strong>1. Which of the following are the components of a UTM appliance?</strong></p>
<p><strong>Answers:</strong></p>
<ol>
<li><span style="background-color: #c66201; color: #fff;">Firewall</span></li>
<li><span style="background-color: #c66201; color: #fff;">Gateway Antispam</span></li>
<li><span style="background-color: #c66201; color: #fff;">Gateway Antivirus</span></li>
<li>IDS/IPS</li>
</ol>
<p><strong>2. Which of the following are Virus propagation techniques?</strong></p>
<p><strong>Answers:</strong></p>
<ol>
<li><span style="background-color: #c66201; color: #fff;">Master Boot Record</span></li>
<li><span style="background-color: #c66201; color: #fff;">File Infection</span></li>
<li>Server Boot Record</li>
<li><span style="background-color: #c66201; color: #fff;">Macro Infection</span></li>
<li>Slave Boot Record</li>
</ol>
</body>
</html>

SH:

#!/bin/bash
to=$1
text=$2

link='https://translate.yandex.ru/api/v1.5/tr.json/translate?key='
key=''
curl -s "$link$key&lang=$to&text=$text" | awk -F '"' {' print $10 '}

Python:

import aiohttp
import asyncio

async def fetch(session, url):
    with aiohttp.Timeout(10):
        async with session.get(url) as response:
            return await response.text()

async def fetch_all(session, urls, loop):
    results = await asyncio.gather(
        *[fetch(session, url) for url in urls],
        return_exceptions=True  # default is false, that would raise
    )

    # for testing purposes only
    # gather returns results in the order of coros
    for idx, url in enumerate(urls):
        print('{}: {}'.format(url, 'ERR' if isinstance(results[idx], Exception) else 'OK'))
    return results

if __name__ == '__main__':
    loop = asyncio.get_event_loop()
    # breaks because of the first url
    urls = [
        'http://SDFKHSKHGKLHSKLJHGSDFKSJH.com',
        'http://google.com',
        'http://twitter.com']
    with aiohttp.ClientSession(loop=loop) as session:
        the_results = loop.run_until_complete(
            fetch_all(session, urls, loop))

NGINX

# DHCP Server Configuration file.
#   see /usr/share/doc/dhcp*/dhcpd.conf.example
#   see dhcpd.conf(5) man page
#
# Use this to send dhcp log messages to a different log file (you also
# have to hack syslog.conf to complete the redirection).
log-facility local7;

subnet 192.168.1.0 netmask 255.255.255.0 {
  range 192.168.1.50 192.168.1.199;
  option domain-name-servers 8.8.8.8, 8.8.4.4;
  option domain-name "jendo.ru";
  option domain-search "jendo.ru";
  option routers 192.168.1.1;
  option broadcast-address 192.168.1.255;
  default-lease-time 600;
  max-lease-time 7200;
}

Python

import aiohttp
import asyncio

async def fetch(session, url):
    with aiohttp.Timeout(10):
        async with session.get(url) as response:
            return await response.text()

async def fetch_all(session, urls, loop):
    results = await asyncio.gather(
        *[fetch(session, url) for url in urls],
        return_exceptions=True  # default is false, that would raise
    )

    # for testing purposes only
    # gather returns results in the order of coros
    for idx, url in enumerate(urls):
        print('{}: {}'.format(url, 'ERR' if isinstance(results[idx], Exception) else 'OK'))
    return results

if __name__ == '__main__':
    loop = asyncio.get_event_loop()
    # breaks because of the first url
    urls = [
        'http://SDFKHSKHGKLHSKLJHGSDFKSJH.com',
        'http://google.com',
        'http://twitter.com']
    with aiohttp.ClientSession(loop=loop) as session:
        the_results = loop.run_until_complete(
            fetch_all(session, urls, loop))
# -*- mode: ruby -*-
# vi: set ft=ruby :

VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  config.vm.box = "geerlingguy/centos6"
  config.ssh.insert_key = false

  config.vm.provider :virtualbox do |v|
    v.name = "munin"
    v.memory = 256
    v.cpus = 1
    v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
    v.customize ["modifyvm", :id, "--ioapic", "on"]
  end

  config.vm.hostname = "munin"
  config.vm.network :private_network, ip: "192.168.33.90"

  # Set the name of the VM. See: http://stackoverflow.com/a/17864388/100134
  config.vm.define :munin do |munin|
  end

  # Ansible provisioner.
  config.vm.provision "ansible" do |ansible|
    ansible.playbook = "provisioning/playbook.yml"
    ansible.inventory_path = "provisioning/inventory"
    ansible.sudo = true
  end

end

# -*- mode: ruby -*-
# vi: set ft=ruby :

VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  config.vm.box = "geerlingguy/centos6"
  config.ssh.insert_key = false

  config.vm.provider :virtualbox do |v|
    v.name = "munin"
    v.memory = 256
    v.cpus = 1
    v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
    v.customize ["modifyvm", :id, "--ioapic", "on"]
  end

  config.vm.hostname = "munin"
  config.vm.network :private_network, ip: "192.168.33.90"

  # Set the name of the VM. See: http://stackoverflow.com/a/17864388/100134
  config.vm.define :munin do |munin|
  end

  # Ansible provisioner.
  config.vm.provision "ansible" do |ansible|
    ansible.playbook = "provisioning/playbook.yml"
    ansible.inventory_path = "provisioning/inventory"
    ansible.sudo = true
  end

end