...
Just my blog

Blog about everything, mostly about tech stuff I made. Here is the list of stuff I'm using at my blog. Feel free to ask me about implementations.

Soft I recommend
Py lib I recommend

I'm using these libraries so you can ask me about them.

Installation Perforce Helix Proxy

From here Download here

Installation on Windows

Just using installer: Windows evidence:

C:\Program Files\Perforce\Proxy>p4p.exe -V
Perforce - The Fast Software Configuration Management System.
Copyright 1995-2015 Perforce Software.  All rights reserved.
This product includes software developed by the OpenSSL Project
for use in the OpenSSL Toolkit (http://www.openssl.org/)
See 'p4 help legal' for full OpenSSL license information
Version of OpenSSL Libraries: OpenSSL 1.0.1l 15 Jan 2015
Rev. P4P/NTX64/2015.1/1028542 (2015/03/20).

And looks like there is nothing different with p4d.exe in logic. [su_spoiler title="p4p.exe -h"]

C:\Program Files\Perforce\Proxy>p4p.exe -h
Usage:

    p4p [ options ]

    Proxy options:
        -d              run as a daemon (fork first, then run)
        -f              run as single-threaded server
        -i              run for inetd (socket on stdin/stdout)
        -q              suppress startup messages
        -c              Do not compress proxy <-> server connection

    General Options:
        -h -?           print this message
        -V              print server version

        -r cache        set proxy cache directory (default $P4PCACHE)
        -v level        debug modes (default $P4DEBUG)

        -L …

Read...

Plone installation

Will try to use Plone CMS for test cases, interesting to see what and how CMS on Python worked. Start here: https://plone.org/documentation/manual/installing-plone/installation-quick-guide For Python: Guide and I've use only one part from it here. I've done everything as guided above.

[root@web Python-2.7.6]# ls -ltr /usr/bin/python*
-rwxr-xr-x. 2 root root 4864 Jan 22  2014 /usr/bin/python2.6
-rwxr-xr-x. 2 root root 4864 Jan 22  2014 /usr/bin/python
lrwxrwxrwx. 1 root root    6 Nov  2 15:46 /usr/bin/python2 -> python
[root@web Python-2.7.6]# ls -ltr /usr/local/bin/python*
-rwxr-xr-x. 1 root root 6214493 Apr 20 11:44 /usr/local/bin/python2.7
-rwxr-xr-x. 1 root root    1674 Apr 20 11:48 /usr/local/bin/python2.7-config
[root@web Python-2.7.6]# echo $PATH
/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
[root@web Python-2.7.6]# which python
/usr/bin/python
[root@web Python-2.7.6]# sudo sh
sh-4.1# which python
/usr/bin/python
sh-4.1# python
Python 2.6.6 (r266:84292, Jan 22 2014, 09:42:36)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on linux2

And Python lives here! Can have some troubles, like:

[root@web plone]# ./install.sh standalone

which: no python2.7 in (/sbin:/bin:/usr/sbin:/usr/bin) …

Read...

Заводим питончика дома или установка Python на Centos 6

Хороший гайд pythonздесь: https://github.com/h2oai/h2o/wiki/Installing-python-2.7-on-centos-6.3.-Follow-this-sequence-exactly-for-centos-machine-only

How to install Python 2.7.6 on CentOS 6.3 (6.2 and 6.4 okay too, probably others)

stolen from Daniel Eriksson. Thanks Daniel! http://toomuchdata.com/2012/06/25/how-to-install-python-2-7-3-on-centos-6-2/ (modified a little) CentOS 6.2 ships with Python 2.6.6 and depends on that specific version. Be careful not to replace it or bad things will happen. If you need access to a newer version of Python you must compile it yourself and install it side-by-side with the system version. Here are the steps necessary to install Python 2.7.6. Execute all the commands below as root. Either log in as root temporarily or use sudo.

Install development tools

In order to compile Python you must first install the development tools:

yum groupinstall "Development tools"

You also need a few extra libs installed before compiling Python or else you will run into problems later when trying to install various packages:

yum install zlib-devel
yum install bzip2-devel …

Read...

Redmine update 3.0.1

Redmine Update

Great, there is a new Redmine 3.0.1 published!

[su_note]Note! Redmine 3.0.1 has A LOT of unsupported plugins from old versions! Better remove them all and update it without plugins and than move back one by one.[/su_note] Some plugins can produce error like: [su_spoiler title="rake generate_secret_token"]

root@tet-redmine www/redmine# rake generate_secret_token
[DEPRECATION] requiring "RMagick" is deprecated. Use "rmagick" instead
Warning: you should require 'minitest/autorun' instead.
Warning: or add 'gem "minitest"' before 'require "minitest/autorun"'
From:
  /var/lib/gems/1.9.1/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `require'
  /var/lib/gems/1.9.1/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `block in require'
  /var/lib/gems/1.9.1/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:240:in `load_dependency'
  /var/lib/gems/1.9.1/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `require'
  /usr/lib/ruby/1.9.1/test/unit.rb:3:in `<top (required)>'
  /var/lib/gems/1.9.1/gems/bundler-1.8.1/lib/bundler/runtime.rb:85:in `require'
  /var/lib/gems/1.9.1/gems/bundler-1.8.1/lib/bundler/runtime.rb:85:in `rescue in block in require'
  /var/lib/gems/1.9.1/gems/bundler-1.8.1/lib/bundler/runtime.rb:68:in `block in require'
  /var/lib/gems/1.9.1/gems/bundler-1.8.1/lib/bundler/runtime.rb:61:in `each'
  /var/lib/gems/1.9.1/gems/bundler-1.8.1/lib/bundler/runtime.rb:61:in `require'
  /var/lib/gems/1.9.1/gems/bundler-1.8.1/lib/bundler.rb:134:in `require'
  /var/www/redmine/config/application.rb:5:in `<top (required)>'
  /var/www/redmine/Rakefile:5:in `<top (required)>'
  /var/lib/gems/1.9.1/gems/rake-10.4.2/lib/rake/rake_module.rb:28:in `load'
  /var/lib/gems/1.9.1/gems/rake-10.4.2/lib/rake/rake_module.rb:28:in `load_rakefile'
  /var/lib/gems/1.9.1/gems/rake-10.4.2/lib/rake/application.rb:689:in `raw_load_rakefile'
  /var/lib/gems/1.9.1/gems/rake-10.4.2/lib/rake/application.rb:94:in `block in load_rakefile'
  /var/lib/gems/1.9.1/gems/rake-10.4.2/lib/rake/application.rb:176:in `standard_exception_handling'
  /var/lib/gems/1.9.1/gems/rake-10.4.2/lib/rake/application.rb:93:in `load_rakefile'
  /var/lib/gems/1.9.1/gems/rake-10.4.2/lib/rake/application.rb:77:in `block in run'
  /var/lib/gems/1.9.1/gems/rake-10.4.2/lib/rake/application.rb:176:in `standard_exception_handling'
  /var/lib/gems/1.9.1/gems/rake-10.4.2/lib/rake/application.rb:75:in `run'
  /var/lib/gems/1.9.1/gems/rake-10.4.2/bin/rake:33:in `<top (required)>'
  /usr/local/bin/rake:23:in `load' …

Read...

Get Acess to VMFS from Windows (Vmplayer+Centos6)

Required:

  • http://www.eastern.nl/2014/12/mounting-vmfs-centos-7/
  • http://www.tecmint.com/how-to-enable-epel-repository-for-rhel-centos-6-5/

Above May not work. So make a VMplayer VM with ESXi installation and mound physical disk where VMFS present. http://www.empirion.co.uk/vmware/vmware-vsphere-client-direct-download-links/ This is the biggest technical perversion I've ever did: There are:VM-vs-MS_pervertion

  • VmWare
    • Vmplayer + ESXi
    • mounted IDE disks with VMFS
    • bridged network
    • vSphereClient
    • added datastores
    • added NFS datastore to host where vmplayer runs (thought it were faster then just download)
  • Windows Server 2012
    • NFS role and share
    • enought space

Bad method. Spent to much time. [su_box title="Warning IMHO!" box_color="#e4b7b7"]Send to the furnace all other ways to download vmdk from vmfs disks at EESXi, do it this way:[/su_box]

  • On the host where you installed Windows 2012 (for example) and where HDD with ESXI disks is mounted install one of this
    • Hyper-V role
    • vmware player

[su_note]I assume you're smart enought to not install OS on the same disk where ESXi host kept it's filesystem?[/su_note]

  • Then create new virtual machine …

Read...

Redmine, Rails, Gems - TOP comands

Устал постоянно гуглить те или иные частые команды для редмайна и его свиты, пришло время собрать их в одном месте и сохранить в закладки. Может кому-то еще пригодится. Будет обновляться, кто хочет может в комментах что-то свое добавить.

Ruby

ruby -v

[su_spoiler title="Result"]

root@tet-redmine www/redmine
# ruby -v ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]

[/su_spoiler]  

Rails

rails -v

[su_spoiler title="Result"]

root@tet-redmine www/redmine
# rails -v Rails 3.2.19

[/su_spoiler]  

Gems:

gem list

             

Read...

Helix Perforce - the name has changed and that`s all for now

Overview

Perforce is a commercial, proprietary revision control system developed by Perforce Software, Inc. The Perforce server manages a central database and a master repository of file versions. Perforce supports both Git clients and clients that use Perforce's own protocol. A Git client can communicate with the Perforce server over SSH or HTTPS, and other Perforce clients communicate with the server via TCP/IP using a proprietary RPC and streaming protocol. Users submit changed files together in changelists, which are applied as atomic commits. The Perforce database is proprietary, preconfigured, and self-installed. It stores system-related metadata (file state, file attributes, branching and merging history, changelists, change descriptions, users, groups, labels, etc.). Files are identified by namespace (i.e., by OS-neutral filenames). File content itself is not stored in the database. MD5 hashes of file content are stored in the database, however, and can be used to verify repository file integrity. Database tables …

Read...

OwnCloud usefull commands

Here I'll collect useful commands for OwnCloud

-su apache or webuser

php /path/of/owncloud/console.php files:scan --all

For user: 

/var/www/owncloud/console.php files:scan sharad

 

But sometimes better to chose option AJAX to scan only specific folder I think.

Read...

Update Redmine 2.6*

Redmine_2_6Как-то совсем упустил момент, когда вышли 2 новых версии редмайна с кучей исправлений и вот обновляху сделал. Кое-какие моменты могут обмать процесс, но общий порядок действий прежний, как описан здесь: http://www.trianglesis.org.ua/update-redmine-2-5-2 Возможные проблемы, некоторые исходят из прошлого гайда, чтобы не ругали меня, что я сломал вам редмайн. Смотрим:  

root@tet-redmine www/redmine# bundle install --without development test
You cannot specify the same gem twice with different version requirements.
You specified: shoulda-matchers (= 1.4.1) and shoulda-matchers (>= 0)

Решается просто закомментированием этих строк. Следующий конфликт начнется от того, что в прошлый раз я во время инсталляции просто руками указал версии, и сейчас файл жестко их использует. Нужно также изменить руками версии в файле gemfile.lock все версии на требуемые ниже:

root@tet-redmine www/redmine# bundle install --without development test
Fetching gem metadata from https://rubygems.org/..........
Fetching additional metadata from https://rubygems.org/..
Resolving dependencies...
You have requested:
  rails = 3.2.21
The bundle currently has rails locked at 3.2.19. …

Read...

centos mount smb

Shitty task I can`t resolve:

[root@web-server tmp]# smbclient -L 192.168.1.22 -U samba
WARNING: The security=share option is deprecated
Enter samba's password:
Domain=[TET-AD] OS=[Windows Server 2008 R2 Enterprise 7601 Service Pack 1] Server=[Windows Server 2008 R2 Enterprise 6.1]

        Sharename       Type      Comment
        ---------       ----      -------
        ADMIN$          Disk      Remote Admin
        C$              Disk      Default share
        Data            Disk      Programms install, Driverpacks, Backups etc.
        E$              Disk      Default share
        F$              Disk      Default share
        Files           Disk      An old IDE 160Gb disk for files and torrents
        H (Daemon tools) Disk
        Home            Disk
        Install         Disk      Installation of programms
        IPC$            IPC       Remote IPC
        J$              Disk      Default share
        Music           Disk      Music from tet-server
        Photos          Disk
session request to 192.168.1.22 failed (Called name not present)
session request to 192 failed (Called name not present)
session request to *SMBSERVER failed (Called name not present)
NetBIOS over TCP disabled -- no workgroup available

But when I`m trying to mount it: 1.

[root@web-server tmp]# mount -t …

Read...