2015-08-29T07:38:16 *** zoso has joined #amclug 2015-08-29T07:38:54 *** zoso has quit IRC (Max SendQ exceeded) 2015-08-29T07:39:23 *** zoso has joined #amclug 2015-08-29T09:59:19 *** zoso has quit IRC (Ping timeout: 272 seconds) 2015-08-29T10:10:46 *** ecthiender has joined #amclug 2015-08-29T10:11:23 *** zoso has joined #amclug 2015-08-29T10:18:33 ecthiender, ping 2015-08-29T10:18:46 zoso, pong :) 2015-08-29T10:18:59 ecthiender, You know about this https://wiki.mozilla.org/WebExtensions :P 2015-08-29T10:19:02 Title: WebExtensions - MozillaWiki (at wiki.mozilla.org) 2015-08-29T10:19:04 zoso, sorry took a while to come online. was running errands. cooking etc. 2015-08-29T10:19:06 no 2015-08-29T10:19:08 * ecthiender is checking 2015-08-29T10:19:25 it is ok, I was also busy writing code. 2015-08-29T10:35:18 zoso, wow thats so cool 2015-08-29T10:35:21 :) 2015-08-29T10:35:58 yup, now it will be straightforward to do so many apps 2015-08-29T10:36:09 I mean browser extensions. 2015-08-29T10:36:12 yeah :D 2015-08-29T10:42:32 zoso, i was experimenting with lxc 2015-08-29T10:43:08 ecthiender, oh nice, I was thinking of making some vagrant machines for some of our projects 2015-08-29T10:43:16 zoso, could get to install and setup lxc, and could create some containers 2015-08-29T10:43:32 so that people end up in issues like setting up dev environment for days 2015-08-29T10:43:39 next step is to create a bridged interface to get internet in the containers 2015-08-29T10:43:46 so how do you find it :) 2015-08-29T10:43:48 zoso, hmm. yeah 2015-08-29T10:43:49 oh nice 2015-08-29T10:43:59 lxc is good. 2015-08-29T10:44:33 i dont know but i found openvz interface to be better. I so wish they merged the two projects 2015-08-29T10:45:05 but I guess lxc has better way of doing this internally. I mean its more elegant of doing kernel-level containerization 2015-08-29T10:45:19 but the API of lxc is little clunky but that's ok :) 2015-08-29T10:45:34 what does openvz use to create vms? 2015-08-29T10:45:54 it creates kernel-level containers. not VMs :) 2015-08-29T10:46:11 yes lxc is old and has that old way of doing things 2015-08-29T10:46:17 openvz stopped development, and merged to lxc. 2015-08-29T10:46:24 I see.. 2015-08-29T10:46:25 no openvz is older than lxc. 2015-08-29T10:46:33 openvz merged their development with lxc 2015-08-29T10:46:45 Oh ok 2015-08-29T10:47:40 but I hated docker. it is just too opinonated and no way of thinking about docker containers as machines. 2015-08-29T10:48:00 but in openvz and lxc you can literally treat each container as separate machines. 2015-08-29T10:49:15 this provides a nice isolation to host, say clients' websites, services quite independently. I think we should have this kind of infra, if we start doing business hosting our clients' stuff. 2015-08-29T10:49:23 zoso, ^, what do you think? 2015-08-29T10:50:11 yes, makes sense. Docker is for process isolation, and yes it is very cumbersome to use. 2015-08-29T10:50:24 even xen machines make sense 2015-08-29T10:50:39 I am in for openvz infra 2015-08-29T10:52:10 zoso, yeah. I thought of xen, kvm too. but they need more powerful host machines. 2015-08-29T10:52:32 container-level virts can be done on a lesser powerful machine 2015-08-29T10:53:11 zoso, we can both the infra setup..as in we can have the knowledge, and automation for both types of infra. 2015-08-29T10:53:33 I see.. 2015-08-29T10:54:13 as kvm and xen does hardware-level virt, meaning they emulate, for each VM, cpu, memory etc. it takes more resource. 2015-08-29T10:54:52 containers just isolate process space, filesystem etc. which, IMHO, provides the optimal isolation needed for things like hosting multiple websites and services 2015-08-29T10:54:57 zoso, ^ 2015-08-29T10:55:30 ya makes sense 2015-08-29T10:55:47 And I think with that we should have Ansible 2015-08-29T10:55:51 and you can have different OSes too! as long as those OSs support the host machine's kernel 2015-08-29T10:56:00 zoso, abso-fucking-lutely! 2015-08-29T10:56:12 zoso, I am going to steal our VLEAD's systems' code :P 2015-08-29T10:56:20 heh :P 2015-08-29T10:56:21 zoso, they have this infra setup ! :) 2015-08-29T10:56:28 with ansible :) 2015-08-29T10:58:15 Ya, you have been talking about it :) 2015-08-29T10:59:36 ya 2015-08-29T11:00:42 I need to do some serious jsfoo now.. I have a gpx file which has to be converted to a geoJSON format. I found a library which does it and have used it in my code. The problem at hand is that the .gpx contains "link" sections and it has attributes which is of interest. The library skips this part, and has a ticket raised against the same. .gpx is xml file 2015-08-29T11:01:14 ohh! 2015-08-29T11:02:11 the lib is python or JS? zoso 2015-08-29T11:02:24 I wish I had v8 setup, I find this process of debugging js on browser too cumbersome :( 2015-08-29T11:02:28 the lib is js 2015-08-29T11:02:40 https://github.com/mapbox/togeojson/blob/master/togeojson.js 2015-08-29T11:02:41 Title: togeojson/togeojson.js at master · mapbox/togeojson · GitHub (at github.com) 2015-08-29T11:03:17 what abou a python lib? which keeps the links section? 2015-08-29T11:05:25 ecthiender, reinventing the wheel 2015-08-29T11:06:10 I found out what the code does, check this https://developer.mozilla.org/en-US/docs/Web/API/Node.normalize 2015-08-29T11:06:46 https://github.com/mapbox/togeojson/blob/master/togeojson.js#L346 2015-08-29T11:06:47 Title: togeojson/togeojson.js at master · mapbox/togeojson · GitHub (at github.com) 2015-08-29T11:07:02 then you use the python lib to convert and pass the geojson to the client side? 2015-08-29T11:07:02 and then follow calls of that function, not much 2015-08-29T11:07:05 zoso, 2015-08-29T11:07:36 I do not want to deal with the hell of parsing xml, when someone has already done most of it 2015-08-29T11:07:45 and the only thing that fails is this 2015-08-29T11:07:51 I can send him a pull request :P 2015-08-29T11:08:17 no no.. use a python library...if it supports .gpx -> geoJSON 2015-08-29T11:08:21 hmm 2015-08-29T11:08:33 the code works like a charm, the only part that does not work is with links 2015-08-29T11:08:39 I tried already, none that do it 2015-08-29T11:08:52 ohh ok 2015-08-29T11:08:52 I have been searching the same for the past day 2015-08-29T11:08:59 i see 2015-08-29T11:09:51 I had written some nice jsfoo in alipi to find the xpath of a given node :P 2015-08-29T11:09:52 then download the JS lib, modify and use it 2015-08-29T11:10:02 yes, doing that.. 2015-08-29T11:10:07 and also send a PR 2015-08-29T11:10:16 :D 2015-08-29T11:12:01 ecthiender, sure, do you mind helping me think through it :P 2015-08-29T11:12:17 sure. not at all! :) 2015-08-29T11:15:39 zoso, shoot 2015-08-29T11:15:45 just look at this line https://github.com/mapbox/togeojson/blob/master/togeojson.js#L346 2015-08-29T11:15:46 Title: togeojson/togeojson.js at master · mapbox/togeojson · GitHub (at github.com) 2015-08-29T11:16:39 okay. looked at it. 2015-08-29T11:17:17 so in that function all those properties are iterated and then their value is fetched, and there is a normalize method which is called, which does this for a node https://developer.mozilla.org/en-US/docs/Web/API/Node.normalize 2015-08-29T11:18:46 which one is the normalize call? the nodeVal? 2015-08-29T11:19:00 or get!? 2015-08-29T11:19:06 sorry get1? 2015-08-29T11:21:19 zoso, ^ 2015-08-29T11:21:43 ok.. nodeVal does the normalize.. figured out 2015-08-29T11:21:48 nodeVal 2015-08-29T11:21:54 sorry was pasting test data 2015-08-29T11:21:56 https://bpaste.net/show/b01a57578fcf 2015-08-29T11:21:57 Title: show at bpaste (at bpaste.net) 2015-08-29T11:22:35 So I was thinking for a link element the normalize should not be called, looking at the structure of it 2015-08-29T11:22:36 okay. saw that.. 2015-08-29T11:23:09 and the href gets extracted and saved 2015-08-29T11:23:46 umm.. i think you should.. if you normalixe then you get what is inside text.. 2015-08-29T11:23:51 no? 2015-08-29T11:24:13 yes, but the text and href could be different 2015-08-29T11:25:20 right you'd want to get both? 2015-08-29T11:25:56 how do they extract lat lon from wpt? 2015-08-29T11:26:08 good point 2015-08-29T11:26:12 let me check that 2015-08-29T11:26:36 https://github.com/mapbox/togeojson/blob/master/togeojson.js#L48 2015-08-29T11:26:37 Title: togeojson/togeojson.js at master · mapbox/togeojson · GitHub (at github.com) 2015-08-29T11:29:06 dude, I am hungry, will have lunch and get back 2015-08-29T11:29:12 ecthiender, ^ 2015-08-29T11:29:14 :) 2015-08-29T11:32:02 zoso, sure :) 2015-08-29T12:33:35 *** zoso has quit IRC (Ping timeout: 244 seconds) 2015-08-29T12:34:04 *** zoso has joined #amclug 2015-08-29T13:16:46 ecthiender, cracked it, the code we were looking at is not the code that I was having at my machine, as it was from a different branch. But most of it is same, the code I used is this https://github.com/mapbox/togeojson/blob/gh-pages/togeojson.js 2015-08-29T13:16:47 Title: togeojson/togeojson.js at gh-pages · mapbox/togeojson · GitHub (at github.com) 2015-08-29T13:17:22 and what I did to fix it was that, just pass the textContent of the link tag, that was missing from the code 2015-08-29T13:36:37 *** zoso has quit IRC (Ping timeout: 260 seconds) 2015-08-29T13:37:07 *** zoso has joined #amclug 2015-08-29T13:50:04 zoso, nice :) 2015-08-29T13:50:10 zoso, sorry. got busy. 2015-08-29T13:50:32 zoso, apparently you cannot bridge a wlan interface! 2015-08-29T14:55:18 zoso, what's up? 2015-08-29T15:10:00 ecthiender, why can't you bridge wlan? 2015-08-29T15:10:10 was afk 2015-08-29T15:10:44 wlan doesn't support bridging when operating in slave mode! 2015-08-29T15:10:59 aah, because ad-hoc isnt supported? 2015-08-29T15:11:08 you remember in Case for Mesh we learnt that you have wireless NIC have a master mode and slave mode 2015-08-29T15:11:18 yes :) 2015-08-29T15:11:41 works when card supports ad-hoc mode. 2015-08-29T15:11:43 its like you have download some other packages and do some other config to get it work in ad-hoc mode..and it is different for each manufacturer :/ 2015-08-29T15:12:05 but popular cards/makers don't support ad-hoc by default 2015-08-29T15:12:05 sad.. 2015-08-29T15:12:15 http://superuser.com/questions/597834/bridging-wifi-to-ethernet-on-ubuntu-not-working 2015-08-29T15:12:16 Title: networking - Bridging Wifi to Ethernet on Ubuntu not working - Super User (at superuser.com) 2015-08-29T15:12:26 http://www.linuxquestions.org/questions/linux-networking-3/creating-a-bridge-interface-eth0-to-wlan0-4175438892-print/ 2015-08-29T15:12:48 I have a quick apache conf question, is it possible to set content-type headers based on the extension of the file? 2015-08-29T15:12:51 zoso, another option is to packet forward from your wlan to eth, and then bridge with eth 2015-08-29T15:13:01 zoso, I would think so. 2015-08-29T15:13:11 ok, will ask in #apache 2015-08-29T15:13:12 zoso, you'd have to dig apache docs 2015-08-29T15:13:21 do a ddg search 2015-08-29T15:13:26 ecthiender, ok 2015-08-29T15:13:27 it should be pretty common use case 2015-08-29T15:17:22 zoso, http://serverfault.com/questions/152363/bridging-wlan0-to-eth0 2015-08-29T15:17:23 Title: linux - Bridging wlan0 to eth0 - Server Fault (at serverfault.com) 2015-08-29T15:21:20 *** ecthiender has quit IRC (Remote host closed the connection) 2015-08-29T17:09:01 ,tell ecthiender about http://ricostacruz.com/nprogress/ 2015-08-29T17:09:01 zoso: Error: I haven't seen ecthiender, I'll let you do the telling. 2015-08-29T17:09:12 ,later tell ecthiender about http://ricostacruz.com/nprogress/ 2015-08-29T17:09:12 zoso: The operation succeeded. 2015-08-29T17:38:43 *** zoso has quit IRC (Ping timeout: 246 seconds) 2015-08-29T17:42:56 *** zoso has joined #amclug 2015-08-29T17:44:12 *** zoso has quit IRC (Read error: Connection reset by peer) 2015-08-29T17:54:07 *** ecthiender has joined #amclug