Page 1 of 4 | Next »
[19:25:10] hackeron: I'm using simple_form currently with mongoid ~6 and it's working OK, it seems mmongoid ~7 completely breaks compatibility. Is there some mongoid friendly alternative to simple_form?
[21:23:05] hackeron: hi there, quick question, I'm working on an IoT device with MQTT, but it's important that all messages are delivered to the MQTT broker. When the IoT device goes offline for any reason, it needs to queue the messages on local storage to be sent when it reconnects. Can you recommend some low overhead local store? - I was thinking maybe PStore but does that handle sudden power failures well and
[21:23:11] hackeron: popping/adding items without needing to rewrite the entire thing? (it's an SD card so need to minimize data writes)
[21:24:51] hackeron: havenwood: can that add and remove lines in place and handle a sudden power failure without corrupting the file?
[21:27:58] hackeron: it seems to also be key value pair - so I don't think I can just push and pop items from it?
[21:29:08] hackeron: yes, so something like Queue.new - but persisted to disk in a reliable/efficient way
[21:40:25] hackeron: havenwood: I'm using rabbitmq now, but I'm having some major issues: https://groups.google.com/forum/?nomobile=true#!topic/rabbitmq-users/ernykxb1mZY -- also, it's very heavy to run erlang/etc on an IoT device. I think Redis could be the way to go
[07:30:26] hackeron: Hey, I'm trying to run bundle exec rails assets:precompile in a Dockerfile, but it's dying with Errno::ECONNREFUSED: Can't connect to: redis://127.0.0.1:6379/0 -- that's correct, I do not have Redis installed yet.. How do I make it stop trying to connect to Redis?
[07:54:49] hackeron: emers2n: matthewd: it's an inializer wihch has Ohm.redis = Redic.new ENV.fetch('OHM_REDIS_URL', 'redis://127.0.0.1:6379/0') -- how do I not run this line of code when running rails assets:precompile?
[08:00:32] hackeron: because redis is used heavily by my app, but when I'm building my docker container, there is no redis service started yet - so I need to run assets:precompile without a running redis service
[08:01:57] hackeron: matthewd: I'm not trying to boot the app, I want to run assets:precompile to build a docker image, it does not require redis yet, so how do I tell my rails code oh, we're building assets? - skip this initializer. This used to be an option in rails3, but can't seem to find a solution in rails5
[08:10:05] hackeron: emers2n: I want it to throw an exception if redis is not available in all other cases, I just want a way to detect if I'm running assets:precompile and skip this (and probably a whole bunch of other irelevant initializers)
[08:12:18] hackeron: trying with "ASSETS_PRECOMPILE=true bundle exec rails assets:precompile" and adding a condition in my initializers - hopefully that should work, but wonder if there is some cleaner way to detect assets:precompile
[04:23:20] hackeron: apeiros: no, not solved yet :( - asked manufacturer for more details and examples
[13:57:25] hackeron: hi there, I'm trying to talk to a serial controller, the instructions say that byte 6 is the high byte checksum - s=(byte)SUM(2;5) CRC_H=0b1000_s7_s6_s5_s4 -- any ideas how to calculate this?
[14:05:45] hackeron: apeiros: I'm not sure, it is what the instructions say: https://www.dropbox.com/s/3212f6s3dw0vvvl/Screen%20Shot%202016-04-24%20at%2019.33.05.png?dl=0
[14:08:31] hackeron: apeiros: yeh, that's what I'm thinking, hmmm - but you have CRC_H=0b1000_s7_s6_s5_s4 and CRC_L=0b1000_s3_s2_s1_s0 - not quite sure what that means
[14:14:19] hackeron: apeiros: thank you, something like this? < '10E0'.unpack("C*").inject(:+) -- let me try that for both checksum values and see what happens, heh
[14:37:29] hackeron: apeiros: doesn't seem to respond to that :( - but it says the checksum needs to be 1 byte, the sum is 3 bytes, hmmm - any ideas?
[14:51:24] hackeron: apeiros: oh wait, I get it, I need to get the "high byte" of the integer - any ideas how to do that?
[14:54:46] hackeron: eam: 32bit, so I have 214 - 3 bytes - I need to get the high and low byte of this integer
[15:00:42] hackeron: eam: yeh, the documentation say to write 2 bytes - the high and low hbyte, hmm
[15:01:05] hackeron: eam: it's not super clear: https://www.dropbox.com/s/3212f6s3dw0vvvl/Screen%20Shot%202016-04-24%20at%2019.33.05.png?dl=0
[15:06:20] hackeron: eam: ah, I see - that's where I am confused - how would I get that and do I write like serial.write(0x214)?
[15:12:00] hackeron: eam: ah, ok, I need to read up a bit more eabout it like 0xff - but that makes sense thank you :) - but for some reason still not getting any response :(
[15:13:22] hackeron: eam: it's a solar controller - I'm trying to do this: https://gist.github.com/xanview/432b9a1bce58de78d18ffc86185707f3 - the instructions are this: https://www.dropbox.com/s/3212f6s3dw0vvvl/Screen%20Shot%202016-04-24%20at%2019.33.05.png?dl=0
[15:15:46] hackeron: eam: added .chr - still no response from the controller, hmm and thank you didn't know that :)
[15:21:02] hackeron: eam: hmm? - it says checksum high byte and checksum low byte - for byte 6 and 7
[15:21:33] hackeron: eam: and it's saying to sum, so I just did '10E0'.unpack("C*").inject(:+).ord which I guess is wrong, heh
[15:23:45] hackeron: eam: nope, just those instructions and nothing else :( - I will ask them for one
[15:31:12] hackeron: eam: since they asked to sum ascii, I figured I will sum the binary representation of the ascii characters?
[19:37:40] hackeron: jhass: yeh, but any RSA key with various sizes I generate wither with openssl genrsa or with ssh-keygen -t rsa seems to look different and not accepted by the caemra - just returns an Invalid XML Content
[19:40:08] hackeron: jhass: NjUzNzU2MGUwZWNiN2UxNjYzZmE4ZWU5MjQ1ODljMWIwNzg3NDAxMDM2NmFhZGEwNTczOTZmMzIzNjkyNTNkYTNhZjE0YzI3MzI3NmZjOTc1ZDZiYzY0YmEwZGE0OGY2M2U1MzQ1ZmY3N2ZiYjg0NzJjNjE5ZmZiYTJhNWRkMWUxNzk3YTdlODZlYjEyZWQ0NDBlN2Q2YTJhZjM3NTMyZGRhNzI2MDAzMzVhYTJkYWVkMzEzODFlODc3NTMyYTMwMTc2OTczZmZiYWMwZGM0NjQ4NWZhNzVkMTU2MjBkN2JjMTk3ODZiMGEzYjk1OWZmYzdkZTlkYzM2ZTgwZGE1Zg==
[19:40:19] hackeron: jhass: with base64 -D it shows: 6537560e0ecb7e1663fa8ee924589c1b07874010366aada057396f32369253da3af14c273276fc975d6bc64ba0da48f63e5345ff77fbb8472c619ffba2a5dd1e1797a7e86eb12ed440e7d6a2af37532dda72600335aa2daed31381e877532a30176973ffbac0dc46485fa75d15620d7bc19786b0a3b959ffc7de9dc36e80da5f
[19:45:05] hackeron: jhass: it's not, when I POST the example - the camera responds with a challenge
[19:45:15] hackeron: jhass: when I post anything I generated with openssl or ssh-genkey, it says invalid XML
[19:51:17] hackeron: jhass: nope, just that document - they have not provided anything else at all :/
[20:05:55] hackeron: jhass: yeh :/ - I know they are a windows shop, they are a fan of SOAP and what not, maybe this is how C# generated public keys look like or something? - whatever they use doesn't appear to be something standard
[20:06:08] hackeron: which is why I guess they have (or at least used to have) a terrible reputation for security
[20:09:05] hackeron: jhass: hmm, very peculiar - but they mention RSA and they mention AES128 there - so how are they taking that and generating a 256byte public key, hmmmm
[20:13:45] hackeron: jhass: haha, I like your thinking - but it sounds pretty retarded on their part :/ - why would anyone do this
[20:20:14] hackeron: jhass: cryptico.publicKeyString(rsakey) - Returns the public key portion of an RSAKey object in ascii-armored string form
[20:38:32] hackeron: jhass: we do - essentially it does cryptico.generateRSAKey(new Date + '', 1024) - then sends the ascii-armored version as a POST request
[20:49:01] hackeron: jhass: small change: Base64.encode64(RSA::KeyPair.generate(1024, 3).public.modulus.to_s(16)).gsub("\n", '')
[20:54:06] hackeron: jhass: so now the camera responds with a challenge 17c68103d1310baca6b65c1702d9510f39314d5e4740c3768d24290ee9f641dd6d07c22f2c219e90ac6d8a2050b2cf893a6b304aef53ee0c7673f1f28d6f02dbfb7142f79f27a130aa78524ec9729380bdbfb8845370cec01038f132f155898f0704ad2be165340e0bc980be57116cdfa951e4f7db4578be3bf711b2916b9600 - how do I now go backwards to decode it, heh?
[20:56:35] hackeron: rsa_key.decrypt('MTdjNjgxMDNkMTMxMGJhY2E2YjY1YzE3MDJkOTUxMGYzOTMxNGQ1ZTQ3NDBjMzc2OGQyNDI5MGVlOWY2NDFkZDZkMDdjMjJmMmMyMTllOTBhYzZkOGEyMDUwYjJjZjg5M2E2YjMwNGFlZjUzZWUwYzc2NzNmMWYyOGQ2ZjAyZGJmYjcxNDJmNzlmMjdhMTMwYWE3ODUyNGVjOTcyOTM4MGJkYmZiODg0NTM3MGNlYzAxMDM4ZjEzMmYxNTU4OThmMDcwNGFkMmJlMTY1MzQwZTBiYzk4MGJlNTcxMTZjZGZhOTUxZTRmN2RiNDU3OGJlM2JmNzExYjI5MTZiOTYwMA==')
[20:59:57] hackeron: => "n\xFD\xC8\xD0\x89\xF6\x8Eiq\xE3_B\xC6\xC0\xFA\xF5-\f[\xFDl`cN\"\xDC\xA6\n\x97\x1D\xF7\xDD\xB8gD\xD4\x9F\x98\xDC\x98\x91\f\xA4\xFF\x0F\xDF\xBE\xA7\x8B\x05\xD69\\\x10\x13Z\x12\xAA\xEF\xE5h\x1D\xE1\\\x1Eqz\xA3m\xD8^\x97\x94\x1F\\\xBE0\xFAY*\x04\xE0\x97#=@h9)\xC4\xC5syXI\x1Dd*\xD5+\xDF\xE1\x1C>;\x9F\x13j)\xDF\xA9\xED@7\x8E\xE1\x01\x91\xE9r\xDD\xAF\x1F\xA9\x0E\xDDda"
[21:12:50] hackeron: jhass: struggling with the last step, I'm doing this: http://pastie.org/10491570 -- does that look right?
[23:18:35] hackeron: jhass: still can't get this to work :( - quick question though, when you said to do challenge.pack("H*") how do you know it's not "h*" or something else?
[23:23:43] hackeron: jhass: hmm, going to try emailing the manufacturer - their activation API manual is just pointless :/