Александр Брюндтзвельт - гений, филантроп, 100 гривен в кармане. Этот блог - "сток" моих мыслей и заметок. Достаточно одного взгляда на него, чтобы понять, что такой же бардак творится у меня в голове. Если вам этот бардак интересен - милости прошу.

Atlassian Confluence REST API Making request and keep the session (Eng)

In this topic I’ll show you how to make session to Atlassian Confluence with python requests and keep it in memory. Based on: http://docs.python-requests.org/en/master/ https://docs.python.org/2.7/library/json.html https://confluence.atlassian.com/confkb/confluence-url-list-317949394.html https://developer.atlassian.com/confdev/confluence-server-rest-api/confluence-rest-api-examples For someone who found this topic by “search machines”, there is some more detailed how-to – probably can help you: https://www.guru99.com/restful-web-services.html Python requests module: At first you should know and understand how requests works, basically. Check how your confluence works: Next – you should know the point, where is your Confluence server make authorisation, in my situation it lies here (this is looks cozy, but this is our company’s way. In your situation it can be simpler, as documented in links above): https://docs.YOURCOMPANYMAME.com/docs/dashboard.action?os_username=configipedia_service_account&os_password=PASSWORD Then you compose a request like: import json import requestsShort Read more…

Atlassian Confluence REST API Logic structure (Eng)

Read this article after you know how to make REST API request to Atlassian Confluence! This topic will show you some part of internal scheme of Confluence API and hierarchy. Based on: https://developer.atlassian.com/confdev/confluence-server-rest-api/confluence-rest-api-examples https://confluence.atlassian.com/doc/confluence-wiki-markup-251003035.html https://docs.atlassian.com/atlassian-confluence/REST/latest/ So, looking on the Confluence docs all this scheme looks like well-structured logical system, but it has some difficulties, just as for me. Before you POST of GET something will be better if you make a probing GET request to see the whole structure in your organisation. In this example you will get those arguments: # Confluence stats space_page = ‘625685389’ space_root_page = ‘625685397’ space_id = ‘624689178’ space_key = ‘~configipedia_service_account’ space_name = ‘DocBot+space’ child_page_1 = ‘625685424’ child_page_2 = ‘625685428’ confPedia_root = ‘https://docs.YOURCOMPANYMAME.com’ confPediaUser = ‘~configipedia_service_account’Short Read more…

Atlassian Confluence REST API (Eng)

How to work with REST API Confluence. Rus What is this topic about? API structure in Atlassian Confluence. Objects, files, relations etc. How to compose API request in Atlassian Confluence? How to open session and hold it on – ! Making headers with requests and – json ! Send a file or file content with wiki markup on Confluence – ! Interpret server answers. What is the difference between “representation“:”storage” and “markup” in Atlassian Confluence? Macro and markup About “Atlassian Confluence” you can read here. https://www.atlassian.com/software/confluence https://wikipedia.org/wiki/Confluence Who need this? For those, who wants to automate documentation stage of DEV. For those, who wants to understand how does python requests working? For my own – to not forger this lesson. When IShort Read more…

Atlassian Confluence REST API

Как работать с REST API Confluence. Eng  О чем этот топик? Структура API в системе Confluence. Объекты, файлы, статьи, родство и проч. Формирование запроса(адреса) в API Confluence Открытие сессии и удержание её в памяти – ! Формирование заголовков при помощи модуля requests и – json ! Отправка файла, содержания файла, вики-разметки на сервер Confluence – ! Интерпретируем ответы от сервера Что такое Atlassian Confluence вы можете почитать здесь: https://www.atlassian.com/software/confluence https://ru.wikipedia.org/wiki/Confluence Кому нужен этот топик? Тем мученикам, которые хотят автоматизировать процесс написания/отправки документации в разработке. Тем мученикам, которые как и я, по очевидным примерам не могут разобраться в модуле requests касаемо работе с заголовками. Мне самому, чтобы не забыть свой “подвиг” и все его наработки, так как память имеет свойство “стираться”.   В тот момент, когдаShort Read more…

Python Run External Command And Get Output On Screen or In Variable

Отседова: http://www.cyberciti.biz/faq/python-run-external-command-and-get-output/ The basic syntax is: import subprocess subprocess.call(“command-name-here”) subprocess.call([“/path/to/command”, “arg1”, “-arg2”]) Run ping command to send ICMP ECHO_REQUEST packets to www.cyberciti.biz: #!/usr/bin/python import subprocess subprocess.call([“ping”, “-c 2”, “www.cyberciti.biz”]) Свой вариант: C:\Python34>python.exe Python 3.4.3 (v3.4.3:9b73f1c3e601, Feb 24 2015, 22:43:06) [MSC v.1600 32 bit (Intel)] on win32 Type “help”, “copyright”, “credits” or “license” for more information. >>> import subprocess >>> subprocess.call([“ping”, “-t”, “8.8.8.8”]) Pinging 8.8.8.8 with 32 bytes of data: Reply from 8.8.8.8: bytes=32 time=49ms TTL=43 Reply from 8.8.8.8: bytes=32 time=42ms TTL=43 Reply from 8.8.8.8: bytes=32 time=42ms TTL=43 Reply from 8.8.8.8: bytes=32 time=42ms TTL=43 Reply from 8.8.8.8: bytes=32 time=43ms TTL=43 Reply from 8.8.8.8: bytes=32 time=42ms TTL=43 Reply from 8.8.8.8: bytes=32 time=42ms TTL=43 Reply from 8.8.8.8: bytes=32 time=42ms TTL=43 Ping statistics forShort Read more…

Всегда делайте БЕКАПЫ! ВСЕГДА! ДЕЛАЙТЕ! БЕКАПЫ!

Сука, истина в последней инстанции! Только что полтора часа провозился с MySql после Power Failure –  слетела база юзеров, чинил, флашил – нихуя не помогало, ровным счетом нихуяшечки! Спасибо, блять, дебиану с его ебаной старой как мир Mysql 5.5… Так вот, я вдруг вспомнил, что делал когда-то бекапы по расписанию, и О БОЖЕ ЧТО ЭТО!!!!Адин-адин111 Полный бекап базочки даже с таблицей юзеров, гугель 30 сек, первая команда рестора – ЗАРАБОТАЛО! Сученька, спасибочки тебе, прошлый я, что поставил бекапы делаться еженедельно, каждый понедельник. Изменил расписание на ежедневно в полночь! Мало бекапов не бывает! Делайте бекапы! Read more…

How to install Oracle WebLogic Server

All from: http://robinbuitenhuis.blogspot.nl/2014/08/how-to-install-oracle-weblogic-server.html   How to install Oracle WebLogic Server I am using Oracle VirtualBox with the Oracle Technology Network Developer Day – Hands-on Database Application Development lab. I am going to use Weblogic Server and Oracle REST Data Services (formerly known as: APEX listener). In this article I will describe the WebLogic installation. First I download WLS on my Windows 7 host from: http://www.oracle.com/technetwork/middleware/weblogic/downloads/wls-main-097127.html Choose: Generic (881 MB) I place the downloaded file in the folder: D:\Oracle\WebLogicServer since the directory D:\Oracle is shared with the virtual machine. Start the installation: cd /media/sf_Oracle/WebLogicServer java -jar fmw_12.1.3.0.0_wls.jar Launcher log file is /tmp/OraInstall2014-08-19_10-29-24PM/launcher2014-08-19_10-29-24PM.log. Extracting files………………… The OpenJDK JVM is not supported on this platform. Ok, I will try again but this time IShort Read more…

Django fast hints

Here some fast hints to remember: Migration: cd ~/myproject python manage.py makemigrations python manage.py migrate   Alias /static/ “/var/www/smm_tools/site/”   Read more…

From vmdk to vhd

StarWind V2V Image Converter VMware vCenter Converter Standalone Client Very useful: http://rmlinar.net/blog/2014/07/29/convert-single-vmdk-to-vhdx-with-microsoft-virtual-machine-converter-2-0-mvmc/ Read more…

Старый и уже не актуальный, но ценный как память…

… опыт работы в “Build Services”. Шерстил папки на гугель диске и че нашел: Интересно вспоминать, что некогда участвовал в процессе налаживания “производственной линии” и срезал углы в несовершенной машине продакшн-пердакшн. Read more…