Posts

linux - AWS Opsworks: logrotate it runs automatically? -

i have configured own logrotate(app logs) , editing(nginx logs), created in recipes(chef). question is: logrotate runs automatically? i ask because have configurations in logs can not exceed 5mb in size, , have logs sizes of 100mb. show crontabs root: crontab -l no crontab root /etc/logrotate.conf weekly su root syslog rotate 4 create include /etc/logrotate.d /var/log/wtmp { missingok monthly create 0664 root utmp rotate 1 } /var/log/btmp { missingok monthly create 0660 root utmp rotate 1 } usually, logrotate run daily cron job. add size 5m , daily logrotate config logs you're interested in. there potential log grow past 5m between daily logrotate runs. tuned lowering size value and/or running logrotate more often. check man logrotate more details.

c# - Complex MultiBinding validation -

i have form has multiple fields. have "validate" button action db input. button activated if bare minimum fields defined user. so far quite simple fields text: <button x:name="manage" content="manage"> <button.isenabled> <multibinding mode="oneway" converter="{staticresource fieldsfilledintovisible}"> <binding elementname="name1" path="text"/> <binding elementname="name2" path="text"/> </multibinding> </button.isenabled> </button> converter being: public class allvaluesdefinedconverter : imultivalueconverter { public object convert(object[] values, type targettype, object parameter, cultureinfo culture) { bool isenabled = false; (int = 0; < values.length; i++) { isenabled = isenabled || string.isnullorempty(values[i].tostring()); } ...

Cygwin commands don't work -

i'm sorry question seems rather vague entire problem i'm facing. tried installing rpm package on cygwin after downloading website same error -bash: rpm: command not found and have reinstalled twice, same problem, , it's not that, can't use simple commands ls. if write ls no output. screen looks like. user@user-pc ~ $ rpm -ivh avr-binutils-2.17tinyos-3.cygwin.i386.rpm -bash: rpm: command not found user@user-pc ~ $ locate rpm | grep bin user@user-pc ~ $ user@user-pc ~ $ ls user@user-pc ~ $ what do fix this? first, locate not auto-update itself; must run updatedb periodically current list of files. optimal speed , usability, add --prunepaths , --prunefs switches. second, try echo $path see current path, , call ls fully-qualified pathname: /bin/ls -l i suspect ls set invalid alias or internal function (bad command parameters). check contents of ~/.bash_profile, ~/.bashrc, , ~/.profile .

python - How to remove punctuation in between words -

i use code strip line of text punctuation: line = line.rstrip("\n") line = line.translate(none, string.punctuation) the problem words doesn't turn doesnt want remove punctuation between words can't seem figure out way so. how should go this? edit: thought using strip() function take effect on right , left trailing of whole sentence. for example: isn't ., stackoverflow - best ? should become: isn't stackoverflow best instead of current output: isnt stackoverflow best assuming consider words groups of characters separated spaces: >>> string import punctuation >>> line = "isn't ., stackoverflow - best ?" >>> ' '.join(word.strip(punctuation) word in line.split() if word.strip(punctuation)) "isn't stackoverflow best" or >>> line = "isn't ., stackoverflow - best ?" >>> ' '.join(filter(none, (word.strip(punctuati...

javascript - How to overwrite element style so it cannot be changed? -

i writing chrome extension , need make of elements' position relative. i've tried add position: relative !important; body 's style. when scrolling page, js inside page changes style of body child element position: fixed , becomes fixed. don't want happen, so, there way make of elements relative once , all? i've tested behaviour on page: http://sandesh.epapr.in/709519/ahmedabad/02-02-2016#dual/4/3 , want header , footer not fixed, no luck. you cannot, change style more specificity or javascript.

python - Switching environments within a fabric script -

i want try execute this env.host_string = "server1.com" cd("/tmp"): run("some command) #switch servers env.host_string = "server2.com" cd("/home"): run("some other command") the issue commands need executed sequentially , not in parrelel. can't figure out way in fabric. i've tried with env("hostname"): not work. use @serial decorator avoid parallel execution of tasks. try @hosts decorator (see same page) limit each task subset of hosts, , argue hosts when call fabric.

selenium - Setting up Microsoft Edge with Protractor (JS), Cucumber JS and Gulp - (no Java, no C#) -

does know how setup microsoft edge browser protractor? i'm using protractor (javascript) , gulp; not java or c#. here's protractor config file: exports.config = { framework: 'cucumber', seleniumargs: ['-dwebdriver.ie.driver=node_modules/protractor/selenium/microsoftwebdriver.exe'], multicapabilities: { 'browsername': 'microsoftedge', javascriptenabled=true, //'platform': 'windows', // 'version': '11' } , { 'browsername': 'chrome', loggingprefs: { driver: 'debug', server: 'info', browser: 'all' } }], } 1. specify browser name 'microsoftedge' then 2. thought point edgedriver.exe did , worked ie browser. what else missing, opens edge browser fails navigate url error var template = new error(this.message); ^ unknownerror: null (warning: server did not provide stacktra...