URL: http://teamcity:8111/httpAuth/app/rest/projects/
Method: POST
Accept: application/xml
| #!/bin/bash | |
| # from http://habrahabr.ru/post/108240/ | |
| ncpus=`grep -ciw ^processor /proc/cpuinfo` | |
| test "$ncpus" -gt 1 || exit 1 | |
| n=0 | |
| for irq in `cat /proc/interrupts | grep eth | awk '{print $1}' | sed s/\://g` | |
| do | |
| f="/proc/irq/$irq/smp_affinity" |
| class BoundedMailboxDirectConsumer extends Actor with Consumer { | |
| import akka.dispatch._ | |
| import akka.util.duration._ | |
| // Create a bounded mailbox for this consumer actor with a capacity of 10 | |
| self.dispatcher = Dispatchers.newThreadBasedDispatcher(self, 5, 100.milliseconds) | |
| // instruct how the route should be customized during route creation (definition) | |
| onRouteDefinition { rd: RouteDefinition => | |
| // on exception attempt max 3 redeliveries with a delay of 1000 ms |
| from mods.remote import create_terminal | |
| from gui import SystemMessages | |
| def add_info(text): | |
| SystemMessages.pushMessage(text, type=SystemMessages.SM_TYPE.Information) | |
| def add_warning(text): | |
| SystemMessages.pushMessage(text, type=SystemMessages.SM_TYPE.Warning) |
URL: http://teamcity:8111/httpAuth/app/rest/projects/
Method: POST
Accept: application/xml
| root@1eec2cd3-2cba-e416-e1b6-845b715b736c:~# uname -a | |
| Linux 1eec2cd3-2cba-e416-e1b6-845b715b736c 3.13.0 BrandZ virtual linux x86_64 x86_64 x86_64 GNU/Linux | |
| root@1eec2cd3-2cba-e416-e1b6-845b715b736c:~# rustc -Vv | |
| rustc 1.0.0-nightly (44a287e6e 2015-01-08 17:03:40 -0800) | |
| binary: rustc | |
| commit-hash: 44a287e6eb22ec3c2a687fc156813577464017f7 | |
| commit-date: 2015-01-08 17:03:40 -0800 | |
| host: x86_64-unknown-linux-gnu | |
| release: 1.0.0-nightly | |
| root@1eec2cd3-2cba-e416-e1b6-845b715b736c:~# cat hello.rs |
| #!/bin/bash | |
| # for an "svn pristine text not present" error like this: | |
| # svn: E155010: Pristine text 'd6612ee6af5d9fb4459cbe7e2e8e18f7fb4201f8' not present | |
| # you can delete the file and retrieve it with svn up | |
| # (if you have local modifications, make up your own plan) | |
| # - | |
| # Run this script from the root of the working copy. | |
| # It retrieves the file that's causing the error from wc.db | |
| # usage example : ./svn-pristine-find.sh d6612ee6af5d9fb4459cbe7e2e8e18f7fb4201f8 |
| # Create a folder for our new root structure | |
| $ export centos_root='/centos_image/rootfs' | |
| $ mkdir -p $centos_root | |
| # initialize rpm database | |
| $ rpm --root $centos_root --initdb | |
| # download and install the centos-release package, it contains our repository sources | |
| $ yum reinstall --downloadonly --downloaddir . centos-release | |
| $ rpm --root $centos_root -ivh centos-release*.rpm | |
| $ rpm --root $centos_root --import $centos_root/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 | |
| # install yum without docs and install only the english language files during the process |
There exist several DI frameworks / libraries in the Scala ecosystem. But the more functional code you write the more you'll realize there's no need to use any of them.
A few of the most claimed benefits are the following: