Activity Graph

Page 1 of 5 | Next »


[21:59:55] i8igmac: has joined #ruby
[22:00:07] i8igmac: any tips for reading files on mtp device
[23:35:26] i8igmac: Remote host closed the connection


[01:53:34] i8igmac: Ping timeout: 268 seconds


[08:16:19] i8igmac: has joined #RubyOnRails


[03:33:37] i8igmac: is there a way to use nokogiri to parse a url and get variables from list?=VAR
[03:36:07] i8igmac: havenwood: is there a way to use nokogiri to pull variables from a url like stuff?list=VAR
[03:36:23] i8igmac: or list=value
[03:37:43] i8igmac: oh, that makes sense
[03:38:12] i8igmac: site,com/?list=value
[03:38:34] i8igmac: oh thanks got it
[03:38:45] i8igmac: nvm url lib does the trick


[14:22:04] i8igmac: has joined #RubyOnRails
[14:22:56] i8igmac: is there a controller generate for a form post request. that will configure routes and create example view.erb.html
[14:25:14] i8igmac: i guess its not to difficult to create a basic form post request. but for the sake of speed.
[15:38:32] i8igmac: has joined #ruby
[15:38:56] i8igmac: if i run a block can i have this block return a variable
[15:39:38] i8igmac: var=stuff.each do |x| return x end
[15:43:32] i8igmac: nvm i dont know how to ask a proper question lol
[15:45:13] i8igmac: block.all? do |x| x.include?("string") end => true
[15:45:24] i8igmac: i want the block to return true
[15:46:50] i8igmac: um, i just used all as a example, maybe that is my problem
[15:47:04] i8igmac: if any line includes the string... let me check
[15:47:42] i8igmac: block.any? do |x| x.include?("string") end => true
[15:49:25] i8igmac: oh, i was making a mistake with the block and nokogiri needs x.to_s.include? or it always returns false
[15:49:58] i8igmac: i just discovered any?
[15:50:12] i8igmac: its works just fine ;-)
[15:50:50] i8igmac: page.css(@href).any? do |x| if x.include?("string"); end
[15:57:14] i8igmac: thanks havenwood
[22:58:12] i8igmac: havenwood: is there a method for running system commands from rails that you might suggest
[22:58:45] i8igmac: `example command that might take ten minutes to complete`
[22:59:48] i8igmac: i was thinking about creating a daemon.rb that would listen for a list of commands for a multi threaded or multiprocess design
[23:01:37] i8igmac: `wget location/large-file -O /tmp/files`
[23:02:42] i8igmac: the server becomes unresponsive when a time consuming command is running in a rails thread.
[23:04:06] i8igmac: run in the background is ideal
[23:04:22] i8igmac: im running this from a controller
[23:05:21] i8igmac: ill check it out, thanks
[23:11:13] i8igmac: wow that looks cool
[23:12:39] i8igmac: pid=spawn 'sleep 20'; Process.detach pid
[23:15:58] i8igmac: that was a quick fix ;-)


[11:23:29] i8igmac: Ping timeout: 252 seconds


[04:52:08] i8igmac: *.net *.split


[02:02:16] i8igmac: has joined #RubyOnRails
[02:02:47] i8igmac: this might sound dumb, but im working on a controller, and something tells me i should not put require 'tool' in the controller
[02:05:22] i8igmac: well. its require 'set'
[02:06:08] i8igmac: im not sure how often the index_controller.rb is loaded, i guess it would be a petty little reoccurring require 'set'
[04:16:03] i8igmac: when you do loops like {|x|} vs do |x| is there a difference ?
[04:16:12] i8igmac: variables inside of {|x| var=1} are only set inside?
[04:16:24] i8igmac: do not exist outside
[04:26:59] i8igmac: ps aux | grep rails => Pid 666
[04:27:07] i8igmac: cant be good


[03:14:36] i8igmac: how can i read each line of a file and make this into a json array.
[03:15:38] i8igmac: {"data":['this is line of']}, {"data":['this is line 2']}, {"data":['and line 3']}
[03:23:26] i8igmac: what im about to try is going to be ugly
[03:23:41] i8igmac: im reading docs on json right now
[03:36:10] i8igmac: i was trying to use Hash.. thank you
[03:36:38] i8igmac: this will help me in the future
[03:36:43] i8igmac: for other things
[03:40:52] i8igmac: http://easyautocomplete.com/ a demo page
[03:41:10] i8igmac: its when your search bar can predict the words your about to type
[03:41:42] i8igmac: yah, lol i dont know what im talking about
[03:42:13] i8igmac: im excited lol thanks for your help
[03:47:22] i8igmac: ok... here we go... lol it might crash
[03:57:50] i8igmac: ill try and put it in a tmpfs or ram file system or w.e


[00:08:46] i8igmac: is there a faster way to get recursive results of a directory other then Dir.glob("tmp/**/*")
[00:12:38] i8igmac: nvm. my machine ssd is probably going out...
[03:10:32] i8igmac: im having a hell of a time getting a recursive dir tree to display with jstree
[03:10:48] i8igmac: i keep starting over from scratch
[03:11:34] i8igmac: it feels like im trying to recreate the wheel
[03:12:26] i8igmac: i need Dir.glob(/tmp/**/*) to produce results in a specific way that i can insert proper opening and closing tags
[03:22:28] i8igmac: its more or less a algorithm mind twister. the order of html tags that need to be inserted into the array
[03:22:51] i8igmac: im working on a basic demo page, then ill try to build the algo... im starting over
[03:26:53] i8igmac: Radar: thanks, i may have looked over that... ill take a closer look
[03:30:45] i8igmac: thanks for your help, i need to see if i can take these resaults and produce with jstree a working demo
[03:31:16] i8igmac: https://pastebin.com/PCLJN05F
[03:31:29] i8igmac: its just junk a few junk folders and unk files
[03:32:58] i8igmac: https://www.jstree.com/docs/html/
[03:33:19] i8igmac: i think i just need to place this infront of it
[03:33:20] i8igmac: $('#tree').jstree(
[03:37:30] i8igmac: this json is so ugly
[03:43:22] i8igmac: i was trying to do it in html, because json is a ugly hash
[03:57:30] i8igmac: Radar: i think your `tree -j /tmp` example might be best for me
[03:58:05] i8igmac: the examples i see posted on that stackoverflow are not recursive... and the results are a ugly mess
[03:59:01] i8igmac: i need to see if i can understand this json crap
[03:59:24] i8igmac: [{}{}],[{}{}[{}{}[}{[][as][}{}{]
[04:00:21] i8igmac: https://www.jstree.com/docs/json/
[04:00:40] i8igmac: this looks like the format that i need to orginize the hash with
[04:02:23] i8igmac: Radar: i should be able to do something like this
[04:02:48] i8igmac: $('#jstree').jstree({ 'core' : { `tree -J /tmp`}});
[04:07:50] i8igmac: Radar: this is a frustrating ugly mess...
[04:20:10] i8igmac: everything is no longer in development
[04:23:18] i8igmac: Radar: essentially what im looking to do is create a tree view and then load the file content into ace-code-editor
[04:23:43] i8igmac: a code editor in the browser of my rails app
[04:24:03] i8igmac: maybe there is already a working plugin that does all of this?
[04:51:04] i8igmac: Radar: i found a solution. for a piece of mind... it was what i orginal was aiming for... wrapping everything in <ul></ul>
[04:51:11] i8igmac: https://github.com/omardelarosa/ruby-file-tree/blob/master/Readme.md


[02:22:30] i8igmac: are there any ide's i can install in my rails app to modify the current running web app
[02:23:08] i8igmac: text editors
[02:23:18] i8igmac: with a tree view
[02:24:34] i8igmac: i would like to make changes to the source from the webbrowser
[02:25:36] i8igmac: i think cpannel and wordpress have this kind of feature
[02:26:43] i8igmac: a text editor with syntax highlighting and a tree view of the project source
[02:27:27] i8igmac: i have been trying to make a basic example, but i fail to even produce a tree view
[02:46:45] i8igmac: im trying to make modifications to the project from my android phone
[02:47:05] i8igmac: a sublime text style interface is what im looking for from the browser
[02:47:59] i8igmac: i do all my coding on my android currently from ssh and nano... but this is a real struggle
[22:29:55] i8igmac: are there any working examples of rails and jstree for displaying a recursive directory structure
[22:30:57] i8igmac: <li id="<% Dir.glob('/tmp/*') %>">Child node 1</li>


[05:36:44] i8igmac: has joined #RubyOnRails
[05:37:08] i8igmac: there is a demo page i cant get to work with rubyonrails
[05:37:16] i8igmac: http://learn.robotgeek.com/iframe/robotgeekTools/
[05:37:33] i8igmac: i placed all the jquery files in public/
[05:37:49] i8igmac: that should be all that is needed
[05:43:46] i8igmac: No route matches [POST] "/jqueryFileTree.rb"
[18:55:30] i8igmac: im looking for a way to display a directory in tree view then edit the files with ace code editor
[18:55:47] i8igmac: i have been trying to get a working treeview for like 10 hours
[18:59:58] i8igmac: i have managed to fix all the rails errors so things seem correct, but im not seeing the responsive tree view
[19:01:33] i8igmac: if some one has a moment to look at this demo page, im trying to reduplicate in rails
[19:01:34] i8igmac: http://learn.robotgeek.com/iframe/robotgeekTools/
[19:45:47] i8igmac: <-- - insanity
[19:45:55] i8igmac: trying the same things over and over
[19:46:07] i8igmac: attempting to get a stupid demo to work on my rails app
[19:47:30] i8igmac: any one with free time to provide some help
[19:48:14] i8igmac: i would like a sublime text style editor to run on my rails app to provide mobile access to modify the current running rails app
[19:48:24] i8igmac: from the browser
[19:52:06] i8igmac: this is the demo page im trying to duplicate
[19:52:08] i8igmac: http://learn.robotgeek.com/iframe/robotgeekTools/
[19:52:27] i8igmac: https://www.abeautifulsite.net/jquery-file-tree#custom_connectors
[19:53:10] i8igmac: at this point im not getting errors.
[19:53:33] i8igmac: its just not displaying results as supposed to
[19:53:50] i8igmac: maybe there is a ide that i can simply install in my rails app?
[19:54:17] i8igmac: to provide modification the the project from the browser
[20:05:39] i8igmac: should i clone the project and upload to git


[04:11:26] i8igmac: are there any ide's for rails that i can install in my rails app for access to the file system
[04:11:46] i8igmac: browser based text editor
[04:11:59] i8igmac: sublime-text look and feel
[07:40:29] i8igmac: Quit: Leaving
[07:48:55] i8igmac: has joined #RubyOnRails
[07:49:10] i8igmac: im having a hard to adding filetreeview to my rails project
[07:49:37] i8igmac: im not getting any errors from rails, but i see no results on my home page
[07:49:56] i8igmac: this is the demo page im trying to add http://learn.robotgeek.com/iframe/robotgeekTools/
[07:50:04] i8igmac: a simple file explorer
[08:34:31] i8igmac: Remote host closed the connection


[22:43:36] i8igmac: has joined #RubyOnRails
[22:44:34] i8igmac: im trying to add jquery.treeview to incorporate with ace editor so i can make changes to the currently running rails app from a webbrowser
[22:44:48] i8igmac: maybe there is a solution that works out of the box?
[23:18:41] i8igmac: some one help me plz
[23:33:01] i8igmac: or maybe, any ide's that run in the browser that would give me a tree view of the server


[04:36:49] i8igmac: Ping timeout: 246 seconds


[02:25:50] i8igmac: has joined #RubyOnRails
[02:26:16] i8igmac: any one use ace editor with rails application
[02:30:39] i8igmac: im not sure if i should use ace-rails-ap gem or the original git repo github.com/ajaxorg/ace-builds
[02:50:00] i8igmac: could some one provide help with ace code editor. i hope to run this editor and make changes to the currently running rails project with a tree source view of the directory structure
[03:20:09] i8igmac: are there any ide's that i can install in my rails app to provide remote access to the project from a android phone


[22:54:00] i8igmac: has joined #RubyOnRails
[22:54:18] i8igmac: are there any rails applications that would allow me to edit my projects from a web browser
[22:54:47] i8igmac: i hope to work on my projects from a android phone with a sublime text style interface
[23:19:38] i8igmac: Ping timeout: 245 seconds


[00:08:05] i8igmac: has joined #RubyOnRails
[00:09:00] i8igmac: are there collections repos of generators like for bootstrap of actioncontroller::live
[00:17:30] i8igmac: Remote host closed the connection


[18:53:28] i8igmac: has joined #ruby
[18:54:45] i8igmac: im working with net-ssh. im trying to duplicate this client command from ssh
[18:54:53] i8igmac: ssh -f user@host 'uname -a'
[18:55:09] i8igmac: ssh -f user@host 'ping google.com'
[18:56:46] i8igmac: ssh -f user@host 'ping google.com > /dev/null'
[18:57:20] i8igmac: this will connect to the host, run a command in the background then disconnect from the host
[18:57:35] i8igmac: any ideas how this could be done with net-ssh
[18:58:51] i8igmac: well, i looked. i didnt see anything on forking exec
[19:00:06] i8igmac: the only way i could background a process is using a separate application like screen
[19:03:04] i8igmac: yes, i have seen these kinds of examples
[19:03:47] i8igmac: these examples depend on applications that may not exist
[19:08:51] i8igmac: yah, thanks
[19:27:18] i8igmac: Remote host closed the connection


[03:50:44] i8igmac: has joined #ruby
[07:13:54] i8igmac: Remote host closed the connection


[06:23:33] i8igmac: has joined #ruby
[07:56:49] i8igmac: Remote host closed the connection


[05:42:59] i8igmac: has joined #ruby
[05:43:22] i8igmac: is there any examples for keyboard-interaction when logging into ssh
[05:44:16] i8igmac: when my ssh server is keyboard-interactive
[05:46:31] i8igmac: automate things
[05:47:14] i8igmac: simple task's
[05:47:36] i8igmac: get temperature and cpu usage
[05:48:26] i8igmac: keyboard-interactive authentication is the login method
[05:54:19] i8igmac: Quit: Leaving


[00:54:43] i8igmac: has joined #RubyOnRails
[00:56:45] i8igmac: i am working on a web interface for a router. im working on displaying live console output to multiple clients with out creating multiple instances of a console application
[00:59:10] i8igmac: for example, i can display wifi signal strength via `iwconfig` and with a a progress bar i can give it a nice live streaming look of a moving progress bar
[00:59:54] i8igmac: but if multiple people view the page, there will be multiple process's running of `iwconfig`...
[02:18:49] i8igmac: Ping timeout: 255 seconds


[01:13:53] i8igmac: Quit: Leaving


[01:38:36] i8igmac: has joined #ruby
[01:39:51] i8igmac: whats your guys preferred online ruby.io emulator
[01:39:57] i8igmac: i thought it was ruby.io
[01:40:25] i8igmac: to pastebin example scripts online
[01:40:34] i8igmac: its wrong. im trying to remember
[01:40:58] i8igmac: you guys have any preferred online ruby emulators?
[01:42:23] i8igmac: there it is evil
[01:42:39] i8igmac: they all work
[06:10:42] i8igmac: Ping timeout: 250 seconds
[06:23:18] i8igmac: has joined #ruby


[03:07:37] i8igmac: im getting a file read error 'invalid byte sequence in UTF-8"
[03:07:43] i8igmac: string.split <---
[03:09:49] i8igmac: http://pastebin.com/kixraxMS
[03:10:56] i8igmac: https://gist.github.com/anonymous/4f803c0e6c1a021cd3ed91beb19d08e9
[03:13:03] i8igmac: https://gist.github.com/anonymous/a13008c6742fa0e4f246542b2b9d82e5
[03:15:07] i8igmac: its binary data
[03:15:18] i8igmac: could be a image or mp3 file
[03:15:55] i8igmac: #<Encoding:UTF-8>
[03:21:56] i8igmac: i have tried binread instead but still the same thing
[03:22:17] i8igmac: string.encode!('UTF-8', 'binary', invalid: :replace, undef: :replace, replace: '')
[03:22:17] i8igmac: years ago i had to do something like this
[03:22:21] i8igmac: but i cant remeber
[04:47:47] i8igmac: Quit: Leaving


[23:24:48] i8igmac: has joined #ruby
[23:25:27] i8igmac: im trying to read from a binary file. remove the header, and save the rest of the binary data as file.mp3
[23:25:47] i8igmac: all my attempts to do so, turn the file into hex
[23:26:29] i8igmac: File.binread(x).index("\r\n\r\n")
[23:28:49] i8igmac: File.binread(x).split("\r\n\r\n")[1]
[23:29:04] i8igmac: this gives me my data.
[23:31:10] i8igmac: jhass: File.write("file.mp3", File.binread.index("\r\n\r\n"))
[23:31:30] i8igmac: i have done this over and over again.
[23:31:42] i8igmac: i think this binread is the problem?
[23:32:14] i8igmac: suggest a file upload?
[23:33:20] i8igmac: http://filebin.ca/2lFciGfm6xi1/dat
[23:34:04] i8igmac: File.write("file.mp3", File.binread("dat").split("\r\n\r\n")[1])
[23:36:25] i8igmac: every thing i try ends up with same results
[23:38:34] i8igmac: i guess it is working, i was oping the mp3 with sublime text to see if it looks ugly binary, but auto shows hex
[23:41:12] i8igmac: that was about 45 minutes of hair pulling
[23:41:17] i8igmac: a few mistakes made
[23:41:27] i8igmac: that was the wrong source file
[23:41:38] i8igmac: so it didnt play in vlc,
[23:42:49] i8igmac: im sniffing data from pandora
[23:49:55] i8igmac: Radar: selected play list based on genres provides a some what random play list
[23:50:15] i8igmac: "1990s rock"
[23:50:23] i8igmac: or what ever


[16:46:18] i8igmac: has joined #ruby
[18:24:13] i8igmac: Quit: Leaving