Posts

Showing posts from June, 2014

javascript change name of called function -

hi im new javascript please gentle. im mixing php calls , have slight issue. need alter function name called in onclick event. <div class=\"span4\" id=\"pass\"> <button class=\"btn btn-block btn-large btn-warning\" id=\"bypass\" disabled onclick=\"pass(); return false;\"> - </button> </div> above div std call. before point variables set function call , need change above call "pinpass2() or pinpass3 etc. function pincheck(id,type,lastid,pin){ document.getelementbyid('fade').style.display=\"block\"; document.getelementbyid('calc').style.display=\"block\"; var staffid = id; document.getelementbyid('bypass').onclick = function (){\"pinpass\"+staffid(); return false; }; } the above function should can't seem working. appreciated. p.s if include following pincheck function desired staffid diaplayed alert

What is a top-level statement in Python? -

in python guide's chapter on project structure , term "top-level statement" brought few times. i'm not sure refers to. guess it's variable declarations happen outside of functions or class methods fire module loaded. correct? include module's import statements? it's not variable declarations (and there aren't variable declarations anyway). it's pretty starts @ indentation level 0. import sys # top-level 3 + 4 # top-level x = 0 # top-level def f(): # top-level import os # not top-level! return 3 # not top-level if x: # top-level print 3 # not top-level else: print 4 # not top-level, executes part of if statement # top-level class toplevel(object): # top-level x = 3 # not top-level, executes part of class statement def foo(self): # not top-level, executes part of class statement print 5

jquery - Ajax call SyntaxError: JSON.parse: unexpected end of data at line 1 column 1 of the JSON data -

Image
i trying make ajax call using jquery , setting session variables using coldfusion 10. error receiving: syntaxerror: json.parse: unexpected end of data @ line 1 column 1 of json data am overlooking something? $('#tooltables_processing_1').on('click', function () { $.ajax({ // location of cfc run url: "redirects/selectedrows.cfm", // send http operation type: "post", // tell jquery we're getting json datatype: "json", // send data cfc data: $('#form').serialize(), // gets data returned on success success: function (data) { console.log(data); window.location = 'forms/exitinterviewpdf.cfm'; }, // runs if error error: function (xhr, textstatus, errorthrown) { // show error console.log(errorthrown); } }); }); if take out datatype: json empty stri

oracle - How do i set working directory in sql developer in code -

i'm using sql developer. i want run scripts. don't want have include folder name in call each script. but want use variable include directory in (the working directory). i can having trouble folder names spaces (this in windows). can me work out how without having rename folder remove spaces? define dir="c:\users\xx\google drive\analytics\recruitment\nsl\2. data understanding\code" @&dir\cb_nsl_impairments.sql; returns error sp2-0310: unable open file: "c:\users\xx\google.sql" oops. solved it. just needed double quotes around script call: @"&dir\cb_nsl_impairments.sql"

google spreadsheet - Query based on datetime interval -

i find out driver available during time based on start , end datetime. i have 2 worksheets. worksheet1 displayes start , end time of drivers in datetime: driver | start time | end time ------------------------------------------ driver 1 | 25-05-2015 09:00 | 25-05-2015 15:00 driver 2 | 25-05-2015 15:00 | 25-05-2015 21:00 driver 2 | 26-05-2015 09:00 | 26-05-2015 15:00 driver 1 | 26-05-2015 12:00 | 26-05-2015 17:00 worksheet2 displays start date of tour tour 1 | 25-05-2015 11:00 tour 2 | 25-05-2015 16:00 tour 3 | 25-05-2015 17:00 tour 4 | 26-05-2015 09:00 i query in worksheet 2 driver worksheet 1 available during time of tour start. =query(worksheet1!a:c,"select c <= date '"&text(a2,"yyyy-mm-dd")&"'",0) but understand need working timedate instead (to actual times of start , end of shifts) , need query interval. if want use dates , times, need datetime instead of date . , since there interval, compariso

java - Android Application Crashes when Creating custom class object -

i'm working on first android app , i'm having trouble creating object of class have programmed in java using oncreate function of activity. activity starts great when not instantiate object, when attempt create object app crashes when switching activity. oncreate function looks this... protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_entry); // show button in action bar. setupactionbar(); forcetable testtable = new forcetable(); double factor = testtable.returnvalue(forcetypes.newtons, forcetypes.newtons); } forcetable class have programmed, code looks this... public class forcetable { private double[][] forcetable; protected enum forcetypes {newtons(0), pounds(1), kilopond(2); public int num; private forcetypes(int num) { this.num = num; } }; protected final class values{ private final static double zerozero = 1.00; private final sta

java - Eclipse freezes when creating a new project or a new class -

i installed eclipse in ubuntu. when create new project or create new class, eclipse freezes. the confusing thing when check workspace, find project or class create means can create projects , classes why freeze and, in case, should kill eclipse , restart again? also, when write code in class , run it, freezes. the problem version of gtk+3. did in eclipse.ini included following 2 lines: --launcher.gtk_version 2 before line --launcher.appendvmargs

html - How to call a function for each element with a particular class, every time the window scrolls (jquery)) -

i trying make scroll-triggered function slides elements in 1 side based on scroll position. run on elements 'my-class', code seems think 'this' window, not each 'my-class' element. there wrong way calling function? how can each element run function? here basic html structure: <div class="wrapper"> <div class="my-class"></div> <div class="not-my-class"></div> <div class="my-class"></div> <div class="not-my-class"></div> <div class="my-class"></div> </div> some css: .wrapper { width: 100%; height: 100%; } .my-class, .not-my-class { width: 100%; height: 350px; margin-top: 10px; background-color: #888888; } and jquery: function fadein($element) { $scrolltop = $(window).scrolltop(); $windowheight = $(window).height(); $pageheight = $('body').height(); $elementheight = $(

ruby on rails - has_and_belongs_to_many association that acts as "through" -

models patient: description: should have 1 referrer association: has_and_belongs_to_many :referrer referrer: description: contains types of referrers such as, not limited to: partners etc. association: has_and_belongs_to_many :referrer referrer type (a new model think should add): details of referrers here, such name of website lead patient go hospital, or name of partner suggested hospital patient. workflow & explanations in form, hospital employee takes details of patient. 1 of details referrer -- entity referred patient hospital. referrer rendered dropdown listbox . i made association between patient-referrer habtm because of following reasons: the referrer model used model aside patient. the referrer model has own scaffold admin can add/remove referrers. requirement (the problem) every time dropdown box's value "partner", there should field input name of entity. 3rd model come in. 3rd model contain the:

Parsing Alexa API with PHP -

i need extracting attributes amazon alexa api. specifically, need extract attribute values "vn" this: <aws:country code="vn"> i able fetch content, , simplexmlelement seems parse okay, brain cannot figure out how reference attributes. here's sample of code: $xml = new simplexmlelement($response, null, false, 'http://awis.amazonaws.com/doc/2005-07-11'); if(count($xml)) { $cc = $xml->response->urlinforesult->alexa->trafficdata->rankbycountry->country['vn']; } here full alexa xml response: this xml file not appear have style information associated it. document tree shown below. <aws:urlinforesponse xmlns:aws="http://alexa.amazonaws.com/doc/2005-10-05/"> <aws:response xmlns:aws="http://awis.amazonaws.com/doc/2005-07-11"> <aws:operationrequest> <aws:requestid>1551fc65-c954-3af9-4cc1-a6c05a87bb98</aws:requestid> </aws:operationrequest> <aws:urlin

python - 'WSGIRequest' object has no attribute 'Email' -

update3 i solved adding more code below after read tutorial once again , got error 'wsgirequest' object has no attribute 'email' after press button the link not have querystring after press save button def post_new(request): #post = get_object_or_404(post) #form = postform() #return render_to_response(request, 'registration.html', {'pk': 12}) #return render(request, 'registration.html', {'form': form}) if request.method == "post": form = postform(request.post) if form.is_valid(): post = form.save(commit=false) #post.author = request.user post.email = request.email post.projectname = request.projectname post.username = request.username post.company = request.company post.contact = request.contact post.initialpassword = request.initialpassword post.usertype = request.

algorithm - Can a Monte Carlo pi calculation be used for a world record? -

Image
i have random function calculate pi monte carlo style : max=10000000; format long; in = 0; tic k=1:max x = rand(); y = rand(); if sqrt(x^2 + y^2) < 1 in = in + 1; end end toc calc_pi = 4*in/max epsilon = abs(pi - calc_pi) calcpi(100000000); if iterate 10e100 times, algorithm compete the world record ? if so, how can find number of iteration give nth digit? this nice exercise calculating pi, inefficient one. remarks: my statistics rusty before had coffee, guess error scales 1 / sqrt(n_guess) . n digits, need error of 10^(-n) , need (10^n)^2 random guesses. if 1e100 guesses, proposed, on order of 50 digits of pi! number of iteration exponentional function of number of required digits, horribly slow. algorithm maybe linear in number of digits want. with large number of guesses required, have start questioning quality of random number generator. your algorithm limited floating-point errors 1e-16 or so. calculating digits of pi require

javascript - what symmetric keys we can use in angular cryptography? -

i using ionic develop mobile application. achieve encryption, using angular mdo cryptography. https://github.com/middleout/angular-cryptography/blob/master/mdo-angular-cryptography.js application has remember me feature save server token in localstorage , check same while launching app. encryption done encrypt sensitive details stored in localstorage. stuck in knowing key can used in above angular cryptography library. tried device uuid seems gets changed while app. upgrade or while ad-hoc testing builds. any ideas of can use key remains same irrespective of install or delete or upgrade ? application targeted android,ios , windows help appreciated !

javascript - Creating Date objects from date string query parameter -

so have action accepts iso 8601 string through query parameter fromdate . example request (encoded) action such http://localhost:1337/createfromdate?fromdate='2016-05-24t04%3a18%3a38.000z' the issue notice when initializing date object fromdate parameter, invalid date returned. however, when hardcode same exact string, creates date object no problem. the server-side code looks this: createfromdate: function(req,res){ console.log(new date(req.query.fromdate)); // invalid date console.log(new date('2016-05-24t04:18:38.000z')); // mon may 23 2016 21:18:38 gmt-0700 (pdt) res.ok() } am missing something? thanks.

How to use Swift Flags inside a Run Script Build Phase in Xcode? -

i added "-d myownflag" other swift flags in build settings of xcode. now, in run script found in build phases, want check existence of flag "myownflag" , execute (e.g. change info.plist setting value) if exists. is possible? if yes, best way this? you can check available environment variables running printenv within runscript phase. the other swift flags can printed running: echo $other_swift_flags from within runscript phase

angularjs - cannot read property 'validator' of undefined in angular 2? -

how validate form in angular2? getting error. https://plnkr.co/edit/slhyswt0mjxklogk1kfo?p=preview <ion-navbar *navbar> <ion-title> ionic 2 </ion-title> </ion-navbar> <ion-content class="has-header"> <form [ngformmodel]="loginform" (submit)="login($event)"> <ion-input stacked-label> <ion-label>username</ion-label> <input type="text" ngcontrol="username"> </ion-input> <ion-input stacked-label> <ion-label>password</ion-label> <input type="password" ngcontrol="password"> </ion-input> <div padding> <button block type="submit" [disabled]="!loginform.valid">login</button> </div> </form> </ion-cont

javascript - How to validate user input is current date and time? -

in html use ext.net datefield <ext:datefield runat="server" id = "date" format="y-m-d hh:mm:ss" submitformat="y-m-d h:i:s" marginspec="0 0 0 60" fieldlabel="gate in date/time" allowblank="false" indicatortext="*" indicatorcls="red-text"/> when view shows correct date time 12:00:00.in javascript var iframeid = $('iframe').attr('id'); var mydate = lazymethod_get(iframeid, "formdetail", "date") var today = new date().toisostring().slice(0, 10); alert(mydate); alert(today); if (mydate > today) { alert("entered date greater today's date "); } else { alert("entered date less today's date "); }} the validation alert date entered less today date. want validate date , time if user insert example 2016-02-03 date wrong , current date. thank you. time in microseconds. if (!date.now) { date.now =

php - How can I view my HTTP or HTTPS request before I send it? -

i'm in process of trying better understand http, more want comfortable working web based apis. of documentation i've read specific api's mention api expect http request in format, specific headers , content. i'm trying use php curl, googling around haven't found way (that understand) print http request screen or text file rather sending it. want make sure request i'm constructing looks how intend to, rather getting success or failure message whatever server request sent to. there easy way this? you should try using fiddler. fiddler show response , request header. other can install extension browser shows header, firefox have such extension think called livehttp... sorry didn't remember name. for web debugging fiddler need http://fiddler2.com/

oracle - how to create html table in fpdf -

i newbie. have problem how convert html table fpdf. html code <html> <body> <table border=1 align=center> <tr> <tr> <td>&nbsp;</td> <td>po1</td> <td>po2</td> </tr> <tr> <td>lo1</td> <td> "this take value database " </td> <td> "this take value database " </td> </tr> <tr> <td>lo2</td> <td> "this take value database " </td> <td> "this take value database " </td> </tr> </table> </body> </html> can tell me how it? please take example @ http://www.fpdf.org/en/script/script41.php

windows - how to create a batch script for replacing the string in a file with out creating a new file for output -

i creating script finds old ip , replace new ip in given input file. have followed examples internet , wrote following script @echo off&setlocal setlocal enabledelayedexpansion /f "tokens=2 delims=:" %%f in ('ipconfig ^| findstr /ic:"ipv4 address"') set ip=%%f set ip1=%ip:~1% echo %ip1% set "search=old ip" set "replace=new ip" set "textfile=sample.txt" set "newfile=output.txt" set outputline= /f "tokens=1,* delims=¶" %%a in ( '"findstr /n ^^ %textfile%"') ( set string=%%a /f "delims=: tokens=1,*" %%a in ("!string!") set "string=%%b" if "!string!" == "" ( echo.>>%newfile% ) else ( set modified=!string:%search%=%replace%! echo !modified! >> %newfile% ) ) del %textfile% rename %newfile% %textfile% ) ) endlocals but not interested create new file

javascript - What is the execution order when both sync and async script tags are used? -

tell me if wrong. javascript code execute single thread. the execution of below javascript code a,b , c, sequentially right. <script src="a"> .... </script> <script src="b"> .... </script> <script src="c"> .... </script> the execution of below code depend upon code , time given each scripts means first 'a' start execute (or 'b', don't know), execution of 'a' stop because time given complete others same chance 'b' , 'c' , 'a' again resume , cycle goes on till execution of each scripts done. <script async src="a"> .... </script> <script async src="b"> .... </script> <script async src="c"> .... </script> but happen when there both synchronous , asynchronous scripts occur below. <script sync src="a"> .... </script> <script async src="b"> .... </script

dynamics ax 2012 - How to sum a field using some conditions in Axapta? -

i have user table this id date value --------------------------- 1001 31 01 14 2035.1 1002 31 01 14 1384.65 1003 31 01 14 1011.1 1004 31 01 14 1187.04 1001 28 02 14 2035.1 1002 28 02 14 1384.65 1003 28 02 14 1011.1 1004 28 02 14 1188.86 1001 31 03 14 2035.1 1002 31 03 14 1384.65 1003 31 03 14 1011.1 1004 31 03 14 1188.86 1001 30 04 14 2066.41 1002 30 04 14 1405.95 1003 30 04 14 1026.66 1004 30 04 14 1207.15 and want make sum table this id date value total --------------------------------------- 1001 31 01 14 2035.1 2035.1 1002 31 01 14 1384.65 1384.65 1003 31 01 14 1011.1 1011.1 1004 31 01 14 1187.04 1187.04 1001 28 02 14 2035.1 4070.2 1002 28 02 14 1384.65 2769.3 1003 28 02 14 1011.1 2022.2 1004 28 02 14 1188.86 2375.9 1001 31 03 14 2035.1

maxmind GeoLite2-City accuracy_radius -

i using maxmind geolite2-city data locate ip addresses. finding ever see 3 distinct values location/accuracy_radius field in response - 1, 100 , 937 frequent result being 937 eg - on debian box seeing: /usr/bin/mmdblookup --file /usr/local/maxminddb/geolite2-city.mmdb --ip=52.84.206.231 location accuracy_radius 937 am correct in interpreting radius of uncertainty of 937 kilometres? if correct afraid have ignore uncertainty , use (usually quite sensible looking) location data being returned. the accuracy radius creates circle around coordinates in actual location of device falls. measured in kilometers. if @ csv version of database, see many other values returned. radius of 937 km indicates country-level knowledge location of ip address.

ios - Collection View in View Controller, Cell touching the top border of Collection View itself (embedded in navigation controller) -

Image
so, i'm trying make horizontal scroll collection view in view controller. view controller embedded in navigation controller. view controller have little spacing on top of cell. , if resize it, cell gonna sink. simply, want little spacing dissapear. collection view inside view controller without embedded in navigation controller i want to i want this embed navigation bar , drag collection view. should work. if doesn't let me know..

javascript - Attach ng-click with angular js directive -

i trying create directive & attach ng-click template. expecting if click on template log statement scope.scrollelem function, not happening. i able create directive not responding click. design approch if directive attached dom element, insert div element before & after dom. inserted div have image (want attach ng-click image) respond event. directive module //rest of code return { restrict: 'eac', controlleras: 'vm', controller: _controller, link: _link } }; link function function _link(scope, elem, attrs) { console.log("method executing:navigator._link"); var params = scope.$eval(attrs.navparams); //separate function used create template //the template dependent on params value scope.createnavigatortemplate = _createnavigatortemplate(scope, elem, params); scope.scrollelem = function() { console.log("abc"); } } creating template function _createnavigator

android - keystore file missing in titanium -

i have published 1 android app on feb 4,2015 developed in titanium ...app directly published location generated , remember dint ask keystore file or release version apk. now have redeveloped same app on phonegap , titanium shifted appcelerator can't run app on titanium platform , problem not getting keystore file. i have keep bundle id same previous version existing users proper update require same keystore file. can on issue? if require other information let me know. see response , this . default, debug keystore stored @ $home/.android/debug.keystore when developing on android studio. hope helps. advise sign apps own release key.

python - Using scrapy to extract multiple data in table td elements -

i new scrapy , try use extract following data "name", "address", "state", "postal_code" sample html code below: <div id="superheroes"> <table width="100%" border="0" "> <tr> <td valign="top"> <h2>superheroes in new york</h2> <hr/> </td> </tr> <tr valign="top"> <td width="75%"> <h2>peter parker</h2> <hr /> <table width="100%"> <tr valign="top"> <td width="13%" height="70" valign="top"><img src="/img/spidey.jpg"/></td> <td width="87%" valign="top"><strong>address:</strong> new york city<br/> <strong>state:</strong>new york<br/> <strong&g

c# - Windows phone 8 design consideration -

Image
i creating app want display rectangles display image @ background , overlay can display text on top of image. see attached image (mock up) so easiest approach achieve desired layout? canvas rectangle imagestroke i did 1 day that: <grid> <grid.rowdefinitions> <rowdefinition height="*" /> <rowdefinition height="auto" /> </grid.rowdefinitions> <image grid.rowspan="2"> <textblock grid.row="1" verticalalignement="bottom"/> </grid> with code text should @ bottom of image.

Why does this code run in javascript ? Function inside an object -

this question has answer here: how object method definition work without “function” keyword? 2 answers when type code in javascript console, not through error, instead runs. var = { b:"123", update(){ console.log("hello"); } } the problem is, update() not have function keyword , when check properties of object a , : b: "123" update: function () __proto__: object what javascript doing here? in ecma script 6, can define properties of object during creation, without : . for example, var data = 100; var = { data }; console.log(a); // { data: 100 } similarly, in case, creating 2 properties, 1 called b , 1 called update , b 100 , update function object called update . read more here note : shorthand notation introduced in ecma script 6. can still use ecma script 5 way of creating properties functio

django - Overriding AppConfig.ready() -

django 1.9.6. trying catch basics of django. namely how applications work. docs: https://docs.djangoproject.com/en/1.9/ref/applications/#methods and in code of class appconfig can read: def ready(self): """ override method in subclasses run code when django starts. """ well, example: my_app/apps.py class myappconfig(appconfig): name = 'my_app' def ready(self): print('my app') i want make ready method work. is, when django finds my_app, let run ready method. the app registered in installed_apps. i execute 'python manage.py runserver'. , nothing printed. if place breakpoint inside ready method, debugger don't stop there. could me: mistake in understanding here. thank in advance. installed_apps = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.mes

error handling - Terminology - exception -

in programming, exceptions errors (divide zero, access violation, ...)? if not, can provide examples of exceptions not errors? thanks. exceptions used manage errors, make error handling easier aren't errors. every unordinary situation require separate code path candidate exception. although use of exceptions control flow can confusing (it depends largely on language), can used break out of loop. sometimes can use exception check if string contains value or if file exists. you can use exceptions terminate threads collaboratively. you should consider different languages have different conventions when exceptions should thrown (e.g. python > c++ > objective c). objective c an extreme : when you’re writing code objective-c, exceptions used solely programmer errors (ios developer library - dealing errors) but isn't norm.

bash - Substitute CarriageReturn with new line and pattern in VIM -

i have file.txt having 3 lines line1 line2 line3 while open file.txt in vim want substitute every cr(carriage return) new line having string "foo" , thing this. $ cat file.txt line1 foo line2 foo line3 foo also looking possibility awk, sed , thing else in bash script. with sed, if want replace carriage return foo : sed 's/\x0d$/\nfoo/' file.txt to add line string foo after every line : sed 's/$/&\nfoo/' file.txt

javascript - Trouble with filtering in AngularJS -

the problem facing follows: if select particular tag/author tags/author dropdown, results getting narrowed down expected; however, when click 'clear' button, content disappears. have refresh page results displayed again. i have application using same logic , in clicing 'clear' button not lead results disappearing. i'm bit concerned why it's working in 1 instance , not in other. i'd appreciate if can me understand i'm going wrong here. the foll part of filter logic: <md-input-container> <label>enter search term</label> <input type="text" ng-model="classifiedsfilter"> </md-input-container> <md-input-container> <label>tags</label> <md-select ng-model="tag"> <md-option ng-repeat="tag in tags | orderby: 'tostring()'" value="{{ tag }}"> <!-- tags here refers newly defined array stores 1 instance of tags against 'tags' pr

ios - NSDate created from NSDateComponents incorrect? -

i created nsdate datefromcomponents , using nscalendar nsgregoriancalendar identifier, here's strange part: date incorrect if it's before point in time before 1900/12/31 nscalendar *calendar = [[nscalendar alloc] initwithcalendaridentifier:nscalendaridentifiergregorian]; nsdatecomponents *components = [[nsdatecomponents alloc] init]; components.year = 1900; components.month = 12; components.day = 31; nsdate *date = [calendar datefromcomponents:components]; components.year = 1901; components.month = 1; components.day = 1; nsdate *date2 = [calendar datefromcomponents:components]; nslog(@"%@",calendar.timezone.description); nslog(@"%@",date); nslog(@"%@",date2); the log be: 2016-05-25 14:58:21.014 date[79754:2192157] asia/shanghai (gmt+8) offset 28800 2016-05-25 14:58:21.015 date[79754:2192157] 1900-12-30 15:54:17 +0000 2016-05-25 14:58:21.015 date[79754:2192157] 1900-12-31 16:00:00 +0000 as can see, there 5 minutes gap during day. h

javascript - TypeScript - Attach module/namespaces to window -

i've built lot of apis , applications using es2015, not used best practices in typescript yet, maybe can me. let's building api/sdk shop. goal user includes js file , accesses shop , namespaces via window object, possible angular , other libs well. window.shop.init(); window.shop.cart.get(); window.shop.cart.set(); window.shop.cart.clear(); in ecmascript 2015, write methods get , set , import them in main file , extend shop object , global object. // in cart.js namespace file export {get} './get'; // in shop.js import * cart './cart'; global.shop = { cart } being approach namespacing in es2015, feels kinda wrong in typescript having module , namespace keywords. i want achieve same in ts. tried things following, no success. module shop { export const cart = {...} } (<any>window).shop = shop; or namespace shop { // ... } (<any>window).shop = shop; there tutorials claiming module automatically attached global/windo

linux - Gammu runonreceive doesnt passing variables -

i want configure rapsberry sms ping pong player. installed gammu-smsd , configured gammu-smsdrc follows: # configuration file gammu sms daemon # gammu library configuration, see gammurc(5) [gammu] # please configure this! port = /dev/ttyusb3 pin= 4135 connection = @ # debugging logformat = textall # smsd configuration, see gammu-smsdrc(5) [smsd] runonreceive = sudo /var/spool/gammu/receivesms.sh service = files pin = 4135 # increase debugging information debuglevel = 1 logfile = /var/spool/gammu/gammu.log include_smsc = 491722270333 # paths messages stored inboxpath = /var/spool/gammu/inbox/ outboxpath = /var/spool/gammu/outbox/ sentsmspath = /var/spool/gammu/sent/ errorsmspath = /var/spool/gammu/error/ so far, sending sms receiving sms works fine! so tried runonreceive thing. , wrote small script should sms sender number , text. , if text "ping" gammu-smsd should send pong sender. reveivessms.sh: #!/bin/sh from=$sms_1_number message=$sms_1_text reply="&

How to implement access controls for Chef Knife SSH -

i want use knife ssh manage our servers replace traditional ssh session. still have how implement controls can use knife ssh? how control linux command level access in knife ssh? how executed commands logged? there way centralize logs audit purpose? thanks! knife ssh isn't own thing, uses actual normal ssh connections have use whatever ssh daemon provides. openssh forcecommand either @ server or authorized_keys level , 1 of many available filtering scripts. if poke around on github i'm sure can find examples of filtering or audit scripts, or can @ docs , build 1 yourself, it's not hard.