ivanskie

Activity Graph

« Prev | Page 2 of 42 | Next »

2018-11-13

[18:33:15] ivanskie: has joined #RubyOnRails
[18:33:17] ivanskie: has joined #ruby-offtopic
[18:33:23] ivanskie: has joined #ruby
[18:33:36] ivanskie: baweaver what time is your keynote at?
[19:23:36] ivanskie: Read error: Connection reset by peer
[21:16:08] ivanskie: has joined #ruby
[21:16:14] ivanskie: has joined #RubyOnRails
[21:16:14] ivanskie: has joined #ruby-offtopic
[21:16:43] ivanskie: i'm having an annoying issue of "WARN: Unresolved specs during Gem::Specification.reset"
[21:17:19] ivanskie: i've done `gem clean` and removed only the gems mentioned in the warning. and this is still popping up (standalone ruby project)
[21:17:50] ivanskie: maybe i should google some more. but the suggestions from what I have found, don't seem to help
[21:26:45] ivanskie: bundle clean --force made it worse. :(
[21:38:44] ivanskie: somehow i've just fixed it
[21:38:46] ivanskie: don't know how
[21:40:20] ivanskie: i'm putting together a TTY based gem (with thor).. and i thought i'd use awesome_print for easier to read output for logging.
[21:40:38] ivanskie: and then was refactoring Gemfile into gemspec for the gem. and since bundle clean --force.. it broke it somehow
[21:40:45] ivanskie: https://github.com/awesome-print/awesome_print
[21:41:11] ivanskie: it adds .ap method to Logger class. and this used to work. and now it doesn't i don't get it.
[21:41:32] ivanskie: so im now removing awesome_print dependency entirely since its not critical
[21:42:50] ivanskie: is it safe to assume that sessions won't be streamed?

2018-11-09

[00:13:19] ivanskie: has joined #RubyOnRails
[00:13:25] ivanskie: has joined #ruby-offtopic
[00:13:25] ivanskie: has joined #ruby
[00:45:45] ivanskie: Quit: My MacBook has gone to sleep. ZZZzzz…
[02:26:36] ivanskie: has joined #RubyOnRails
[02:26:40] ivanskie: has joined #ruby
[02:27:02] ivanskie: has joined #ruby-offtopic
[03:26:19] ivanskie: Quit: My MacBook has gone to sleep. ZZZzzz…
[05:13:02] ivanskie: has joined #ruby
[05:13:06] ivanskie: has joined #ruby-offtopic
[05:13:12] ivanskie: has joined #RubyOnRails
[05:49:14] ivanskie: Quit: My MacBook has gone to sleep. ZZZzzz…
[06:44:36] ivanskie: has joined #ruby-offtopic
[06:44:48] ivanskie: has joined #RubyOnRails
[06:44:48] ivanskie: has joined #ruby
[07:21:31] ivanskie: Quit: My MacBook has gone to sleep. ZZZzzz…

2018-11-08

[15:30:43] ivanskie: has joined #ruby-offtopic
[15:30:48] ivanskie: Client Quit
[16:59:00] ivanskie: has joined #ruby-offtopic
[16:59:07] ivanskie: has joined #ruby
[16:59:15] ivanskie: has joined #RubyOnRails
[17:00:37] ivanskie: Client Quit
[17:03:31] ivanskie: has joined #RubyOnRails
[17:03:33] ivanskie: has joined #ruby-offtopic
[17:03:37] ivanskie: has joined #ruby
[17:41:19] ivanskie: Quit: My MacBook has gone to sleep. ZZZzzz…
[17:42:46] ivanskie: has joined #RubyOnRails
[17:42:46] ivanskie: has joined #ruby-offtopic
[17:42:59] ivanskie: has joined #ruby
[19:01:27] ivanskie: Quit: My MacBook has gone to sleep. ZZZzzz…
[19:04:40] ivanskie: has joined #RubyOnRails
[19:04:40] ivanskie: has joined #ruby-offtopic
[19:04:53] ivanskie: has joined #ruby
[19:21:03] ivanskie: Quit: My MacBook has gone to sleep. ZZZzzz…
[19:25:13] ivanskie: has joined #ruby
[19:25:13] ivanskie: has joined #ruby-offtopic
[19:25:15] ivanskie: has joined #RubyOnRails
[20:32:21] ivanskie: Quit: Textual IRC Client: www.textualapp.com

2018-11-07

[04:42:34] ivanskie: has joined #ruby
[04:42:34] ivanskie: has joined #RubyOnRails
[04:42:40] ivanskie: has joined #ruby-offtopic
[05:38:08] ivanskie: Quit: My MacBook has gone to sleep. ZZZzzz…

2018-11-06

[00:49:34] ivanskie: Quit: My MacBook has gone to sleep. ZZZzzz…
[02:35:52] ivanskie: has joined #ruby
[02:35:53] ivanskie: has joined #RubyOnRails
[02:36:01] ivanskie: has joined #ruby-offtopic
[05:23:07] ivanskie: Quit: My MacBook has gone to sleep. ZZZzzz…
[05:33:09] ivanskie: has joined #ruby-offtopic
[05:33:13] ivanskie: has joined #RubyOnRails
[05:33:24] ivanskie: has joined #ruby
[05:50:05] ivanskie: Quit: My MacBook has gone to sleep. ZZZzzz…
[05:50:57] ivanskie: has joined #RubyOnRails
[05:50:57] ivanskie: has joined #ruby-offtopic
[05:51:30] ivanskie: has joined #ruby
[07:08:03] ivanskie: Quit: My MacBook has gone to sleep. ZZZzzz…
[16:07:10] ivanskie: has joined #ruby-offtopic
[16:07:10] ivanskie: has joined #RubyOnRails
[16:07:10] ivanskie: has joined #ruby
[16:08:15] ivanskie: Client Quit

2018-11-05

[17:46:01] ivanskie: has joined #RubyOnRails
[17:46:03] ivanskie: has joined #ruby
[17:46:13] ivanskie: has joined #ruby-offtopic
[21:27:35] ivanskie: Quit: Textual IRC Client: www.textualapp.com
[23:04:14] ivanskie: has joined #ruby-offtopic
[23:04:14] ivanskie: has joined #ruby
[23:04:19] ivanskie: has joined #RubyOnRails
[23:04:25] ivanskie: o hai there
[23:04:34] ivanskie: anyone considers themselves a Thor expert? lol
[23:05:17] ivanskie: i hijacked the bin executable, and renamed the main one so that I can do stuff in parant shell in a certain situation.
[23:06:08] ivanskie: anyway now all help / error outputs the name of the renamed executable (i added '_'. in my case).
[23:06:16] ivanskie: is there anyway to override that behaviour?
[23:40:56] ivanskie: my main executable lets say was exe/`command` i renamed it `_command` and added `command` which just has an if/else block in it. if second argumant matches it runs something else. otherwise it just starts `_command`.
[23:41:40] ivanskie: so now `$ command help` says `'_command help' - show help`
[23:41:48] ivanskie: if that makes any sense
[23:43:36] ivanskie: im using https://github.com/piotrmurach/tty to create the thor based gem.
[23:53:04] ivanskie: it worked for main command
[23:55:54] ivanskie: heh, have to add in every command class. alright cool. thanks havenwood

2018-11-02

[00:41:00] ivanskie: Quit: My MacBook has gone to sleep. ZZZzzz…
[16:45:48] ivanskie: has joined #RubyOnRails
[16:45:51] ivanskie: has joined #ruby-offtopic
[16:45:55] ivanskie: has joined #ruby
[20:11:27] ivanskie: i have a net::ssh or net::ssh::gateway question again :)
[20:19:00] ivanskie: i'm trying to do local forward now, through bastion host
[20:20:03] ivanskie: looking at a couple posts https://stackoverflow.com/questions/4103809/how-to-create-a-ssh-tunnel-in-ruby-and-then-connect-to-mysql-server-on-the-remot and https://stackoverflow.com/questions/37985266/create-a-background-ssh-tunnel-in-ruby and https://stackoverflow.com/questions/13998267/how-to-properly-implement-netssh-port-forwards
[20:20:31] ivanskie: ssh -f my_bastion_host -L $myport:$RDS_HOSTNAME:$RDS_PORT "sleep 10"
[20:21:19] ivanskie: something like that from within ruby. expose the port, print a postgresql::// url in cli to open in postico.. then if it doesn't shutdown on its own, have some other loop to shutdown the tunnel
[20:23:19] ivanskie: i tried this: https://dpaste.de/LMYe it aint working
[20:26:03] ivanskie: @params and params are indeed valid and separate things. so its not a typo in that regard.. uhm was looking at debugger output and it doesn't even try to send anything when i click the postgresql url then. for 127.0.0.1 etc etc
[20:28:51] ivanskie: am i crazy for trying to do this this way? lol
[20:30:39] ivanskie: our RDS (postgress database on amazon) isn't exposed to the public. But our bastion host has access to it. So I'm trying to open a tunnel to bastion with port forwarding to the RDS endpoint from bastion. if that makes sense?
[20:32:08] ivanskie: "ssh -f my_bastion_host -L $myport:$RDS_HOSTNAME:$RDS_PORT "sleep 10"" when the envars are filled... connects to bastion host, does local port forwarding to 65432 (in case one of us has local postgres server running). then I can just launch postico pointing to 127.0.0.1:56432 with credentials for RDS db. and get in there.
[20:32:36] ivanskie: the "sleep 10" command just executes on bastion, giving me time to open postico. then ssh tunnel doesn't close until i close postico or whatever.
[20:33:46] ivanskie: Im trying to do that now in ruby. because I need to dynamically lookup which bastion/jump box to connect to, and pull correct RDS endpoint and creds based on which app / environment is specified beforehand.
[20:34:58] ivanskie: i've got Teletype (tty) / Thor gem going.
[20:35:13] ivanskie: for command line app
[20:35:30] ivanskie: i have everything done except the tunnel building :(
[20:36:17] ivanskie: i've tried building a system ssh command line string. and something isn't working right.
[20:37:39] ivanskie: oh actually i think i just need to keep track of the PID... then i can kill it in ruby afterwords.. hmmmmmmmmmm anyway im hoping i can do this with net::ssh or net::ssh::gateway gem
[20:41:29] ivanskie: oh i think i just found the issue
[20:46:03] ivanskie: i did it!!!!!
[20:46:33] ivanskie: cake time. unfortunately the one day i actually want to grab a beer. work fridge only has pop :( sad day
[20:47:17] ivanskie: for anyone interested... : https://www.madebylotus.com/blog/handling-port-forwarding-in-ruby/
[20:50:35] ivanskie: fridays are so quiet here
[20:50:55] ivanskie: i noticed in debug output that it says when forwarding agent closes...
[20:51:24] ivanskie: i wonder if there's a way I can have a loop in my code to monitor for that and just quit the app. for now i just have a 5 minute timer, or press any key to quit prompt
[20:53:27] ivanskie: hmm... anyway now im in bonus round. maybe time to code a way to run rake tasks on our apps, without sshing in, etc etc
[21:57:22] ivanskie: is there a way to modify yaml file without destroying the comments?
[23:22:50] ivanskie: Quit: My MacBook has gone to sleep. ZZZzzz…

2018-11-01

[15:42:01] ivanskie: has joined #ruby-offtopic
[15:42:01] ivanskie: has joined #ruby
[15:42:12] ivanskie: has joined #RubyOnRails
[16:55:36] ivanskie: i gave up with my quest of making it work with net::ssh. can't beat it into submission. though it's just not meant for what i want obviously. ended up just doing Kernel.exec launching a cooked up ssh command.
[18:34:35] ivanskie: Read error: Connection reset by peer
[19:06:16] ivanskie: has joined #ruby
[19:06:17] ivanskie: has joined #RubyOnRails
[19:06:18] ivanskie: has joined #ruby-offtopic
[19:06:46] ivanskie: apeiros I haven't tried sshkit. but it looks like it could be quite useful in my case. it doesn't help with interactive shell though.
[19:08:41] ivanskie: thanks for the suggestion though!
[19:40:48] ivanskie: yeah i had to find that out the hard way.. rather I assumed i could do it and went on.
[19:41:20] ivanskie: but thats what i just ended up doing. just build the ssh command string then Kernel.exec into it.
[19:41:49] ivanskie: sshkit looks cool for running rake commands on remotes after jumping through jumpbox tho.
[19:43:17] ivanskie: so i could do.. `$ app rake super-awesome-rake-task --app my-cool-app --env staging`. and it'd jump to right box and run the rake command within correct folder and envars, etc etc with pretty output. looks promising haha
[20:36:04] ivanskie: there's some hardware that uses kerberous auth to get into xml api
[20:36:25] ivanskie: ACTION gets unpleasant shiver from the memories
[20:37:05] ivanskie: though i've never had to ssh with that
[23:24:27] ivanskie: hey uhm how do you do this in ruby? namespace = 'aws:elasticbeanstalk:application:environment'
[23:24:28] ivanskie: vars = {n['OptionName']: n['Value'] for n in settings
[23:24:29] ivanskie: if n["Namespace"] == namespace}
[23:26:26] ivanskie: settings.map {|n| n{'OptionName'] = n['Value'] if n==namespace }. ?
[23:28:21] ivanskie: nevermind got it
[23:43:56] ivanskie: nope dont got it
[23:52:21] ivanskie: i got it figured out. in that i didn't have to do the map at all
[23:52:43] ivanskie: yeah i'm trying to get env vars.
[23:53:28] ivanskie: looks like in ruby sdk, it just stuffs them all into single option setting called 'EnvironmentVariables'. a comma separated list of assignments. as one string
[23:53:36] ivanskie: which im now trying to convert to a hash.
[23:55:49] ivanskie: baweaver you are a genius

2018-10-31

[01:39:28] ivanskie: has joined #ruby
[01:39:33] ivanskie: has joined #RubyOnRails
[01:39:34] ivanskie: has joined #ruby-offtopic
[01:50:57] ivanskie: Quit: My MacBook has gone to sleep. ZZZzzz…
[16:57:14] ivanskie: has joined #ruby
[16:57:24] ivanskie: has joined #RubyOnRails
[16:57:24] ivanskie: has joined #ruby-offtopic
[17:14:14] ivanskie: its okay, once you learn programming you can just write an AI to learn other things for you.
[17:14:45] ivanskie: I have a question uhm.
[17:15:00] ivanskie: I'm using net-ssh with net-ssh-gateway.
[17:15:26] ivanskie: I was able to send in request_pry, and launch my command and see the output.
[17:15:36] ivanskie: and i can type things.
[17:15:53] ivanskie: except, when I press Enter it just sends new-line.
[17:17:13] ivanskie: There's this old example: https://net-ssh.github.io/ssh/v1/chapter-5.html#s5
[17:17:48] ivanskie: b is right.
[17:18:24] ivanskie: oft_gegong: if you are impatient, then just start writing a program. and figure out how to do it as you go.
[17:18:36] ivanskie: kind of a backwards approach
[17:20:40] ivanskie: so the old example doesn't work anymore, its outdated documentation. :(
[17:21:15] ivanskie: But dkowis on github essentially re-wrote it.. and it still doesn't work https://github.com/net-ssh/net-ssh/issues/622
[17:21:28] ivanskie: very sad day
[17:22:45] ivanskie: I don't understand what intercepts the characters and ignores CR. rather it actually replaces CR with NL
[17:24:14] ivanskie: there are these: http://net-ssh.github.io/net-ssh/Net/SSH/Connection/Term.html. I don't even know how to describe it. But I haven't been able to figure out where to put it, and enable/disable some of these flags.
[17:25:55] ivanskie: i might have to use what I have to just establish a port forwarding, then call a system ssh command to launch into the remote shell that way. so sad :(
[17:26:27] ivanskie: I'm basically replicating parts of Heroku toolbelt cli
[17:27:05] ivanskie: for our aws setup. eb ssh will not work, because everything is behind a firewall basically.
[17:28:28] ivanskie: its frustrating to get to launching into rails console through a jump box, etc etc.. just to get to the irb>. and be able to type and erase.. but when you press Enter it's like you are in text editor lol.
[17:28:39] ivanskie: ACTION goes weeping
[17:45:26] ivanskie: i was thinking that the ICRNL setting was doing it.
[17:46:22] ivanskie: eam: so once I make the connection, i'd just execute an stty command to change the behavior?
[17:47:42] ivanskie: its a good lead tho
[17:53:10] ivanskie: hmm interesting
[17:53:49] ivanskie: ch.exec('stty icrnl') before requesting pty, says 'stty: standard input: Inappropriate ioctl for device' but exec that after request pty.. and it closes the channel.
[18:03:44] ivanskie: eam have you had more coffee yet?
[18:03:50] ivanskie: you're like my only hope
[18:07:58] ivanskie: This is the output for `stty -a` once pty connection is established. https://dpaste.de/EfPJ
[18:08:58] ivanskie: yeah here's the culprit: "-igncr icrnl"
[18:09:43] ivanskie: ignore carriage return turn cr into newline
[18:13:02] ivanskie: under what kind of light?
[18:15:03] ivanskie: quite probable
[21:21:34] ivanskie: any IO/console experts here?
[21:22:02] ivanskie: i think so?
[21:22:34] ivanskie: background: writing a pseudo copy of heroku cli. specifically command to launch into rails console on remote machine.
[21:23:26] ivanskie: eam has pointed me in the right direction with changing stty or something similar modes.. im not having amazing luck there. anything i try changing results in it complaining about incompatible mode for ssh.
[21:24:09] ivanskie: and now i've sumbled upon io/console and now when im in irb> on remote machine (using net::ssh) i press enter, and it acts as if I open a "
[21:24:16] ivanskie: irb(main):002:0*
[21:24:16] ivanskie: irb(main):001:0>
[21:25:25] ivanskie: my super ugly code (cause i've been at it for like 10+ hours now) https://dpaste.de/jP77
[21:25:41] ivanskie: lines of interest here i think are 69-76
[21:26:44] ivanskie: supposedly.. I wait for stdin activity and then send raw characters through. This snippet of code now causes two problems. 1. this is a heavy loop, not really letting much else happen on screen. 2. i have no idea what im doing so i'm not exactly getting the result i want.
[21:32:56] ivanskie: i can't remember how to reproduce that now
[21:36:37] ivanskie: i know im so helpful right now. i think i need a break from this lol. i've spent a bunch of time to get to this point. its just annoying
[21:56:27] ivanskie: ok im onto something
[21:56:59] ivanskie: i think its something with the io buffer
[21:59:52] ivanskie: https://imgur.com/a/hM3vPbV
[22:06:28] ivanskie: oh so close now
[22:39:16] ivanskie: okay so now.. this gets me to the shell. and i can type and press enter. but i keep having to press enter twice.. https://dpaste.de/Swda#
[22:39:40] ivanskie: first Enter press sends newline.. and second counts as CR
[22:40:18] ivanskie: https://imgur.com/a/pFpYar5
[22:40:40] ivanskie: what would make it behave like that?
[22:50:40] ivanskie: without $stdin.iflush the screen buffer is basically one character behind
[23:52:56] ivanskie: Quit: My MacBook has gone to sleep. ZZZzzz…

2018-10-30

[05:14:52] ivanskie: has joined #RubyOnRails
[05:14:59] ivanskie: has joined #ruby-offtopic
[05:15:01] ivanskie: has joined #ruby
[05:15:11] ivanskie: Client Quit
[15:26:52] ivanskie: has joined #ruby-offtopic
[15:26:57] ivanskie: has joined #RubyOnRails
[15:27:01] ivanskie: has joined #ruby
[22:23:56] ivanskie: Read error: Connection reset by peer

2018-10-26

[04:01:04] ivanskie: has joined #RubyOnRails
[04:01:07] ivanskie: has joined #ruby
[04:01:10] ivanskie: has joined #ruby-offtopic
[05:21:49] ivanskie: Quit: My MacBook has gone to sleep. ZZZzzz…

2018-10-25

[19:01:53] ivanskie: speaking of which.. I'm still not even sure if this is going to work. i need to figure out how to run the .sh script which will source file with new envars. to apply to original shell
[19:01:59] ivanskie: argh headache
[19:11:11] ivanskie: right. so the way awsp dev is doing it, and how i replicated it in bash script. is.. I have an alias for 'source .myscript.sh' in .myscript.sh i show the menu, menu writes a temp file with exports. then .myscript.sh sources the temp file, deletes it, and exits.
[19:12:02] ivanskie: awsp dev made his npm script actually be called _awsp in shell.. and the alias for awsp goes to his sh. file which launches the javascript based _awsp script for menu.
[19:12:22] ivanskie: i guess i'll have to do the same but ruby. argh its messy.
[23:10:45] ivanskie: Quit: My MacBook has gone to sleep. ZZZzzz…