PaulePanter

Activity Graph

Page 1 of 3 | Next »

2019-08-22

[00:56:01] PaulePanter: *.net *.split
[01:13:40] PaulePanter: has joined #ruby

2019-08-14

[03:10:52] PaulePanter: Ping timeout: 245 seconds
[03:11:44] PaulePanter: has joined #ruby

2019-06-24

[10:39:13] PaulePanter: Ping timeout: 245 seconds
[10:47:06] PaulePanter: has joined #ruby

2019-04-22

[08:28:34] PaulePanter: Read error: Connection reset by peer
[08:31:17] PaulePanter: has joined #ruby
[09:20:37] PaulePanter: Ping timeout: 244 seconds
[18:35:15] PaulePanter: has joined #ruby
[21:59:04] PaulePanter: Ping timeout: 246 seconds
[22:00:56] PaulePanter: has joined #ruby
[22:18:18] PaulePanter: has joined #ruby

2019-04-13

[16:50:07] PaulePanter: *.net *.split

2019-04-01

[00:57:47] PaulePanter: has joined #ruby
[11:22:52] PaulePanter: Quit: leaving
[11:56:23] PaulePanter: has joined #ruby

2019-02-18

[05:22:59] PaulePanter: Ping timeout: 272 seconds

2018-12-12

[03:05:52] PaulePanter: Ping timeout: 244 seconds
[07:29:51] PaulePanter: has joined #ruby

2018-11-07

[23:06:34] PaulePanter: has joined #ruby
[23:06:52] PaulePanter: https://paste.debian.net/1050846/
[23:06:52] PaulePanter: Hi. The ZDNS JSON output, just seems to put a JSON object on each line.
[23:07:03] PaulePanter: The Ruby JSON parser complains about that.
[23:07:12] PaulePanter: Do you know if that is valid JSON?
[23:19:11] PaulePanter: al2o3-cr: I open the file with these lines, and then pass that to JSON.parse.
[23:24:15] PaulePanter: So, I have to parse each line as JSON?
[23:24:39] PaulePanter: https://paste.debian.net/1050850/
[23:25:25] PaulePanter: Or is adding a JSON object on separate lines without a delimiter not a valid JSON file?
[23:33:27] PaulePanter: Understood. I’ll open an issue at zdns.
[23:35:23] PaulePanter: Looks like I also need to put [] around it in the file to make it an array.
[23:36:10] PaulePanter: al2o3-cr: If I edited my “JSON” file and put a comma between the two objects, JSON.parse still complained.
[23:39:48] PaulePanter: al2o3-cr: Sorry, I didn’t mean [] to use in the Ruby code, but just editing the JSON file.
[23:40:08] PaulePanter: json_verify von yail seems to agree.
[23:40:26] PaulePanter: Anyway, it seems to be a zdns issue (or me misreading something about the output format).
[23:40:31] PaulePanter: Thank you very much for your help.

2018-09-05

[03:51:28] PaulePanter: Ping timeout: 260 seconds

2018-07-20

[00:07:15] PaulePanter: *.net *.split
[00:15:38] PaulePanter: has joined #ruby

2018-07-15

[08:06:14] PaulePanter: Remote host closed the connection
[08:08:33] PaulePanter: has joined #ruby
[08:13:05] PaulePanter: Ping timeout: 240 seconds
[09:37:56] PaulePanter: has joined #ruby

2018-05-29

[02:47:17] PaulePanter: *.net *.split
[02:48:04] PaulePanter: has joined #ruby

2018-05-15

[03:23:06] PaulePanter: Quit: Lost terminal
[05:43:51] PaulePanter: has joined #ruby

2018-05-04

[03:02:08] PaulePanter: Remote host closed the connection
[08:33:07] PaulePanter: has joined #ruby

2018-04-25

[12:25:42] PaulePanter: *.net *.split
[12:27:23] PaulePanter: has joined #ruby
[15:01:12] PaulePanter: *.net *.split
[15:03:14] PaulePanter: has joined #ruby

2018-04-04

[08:10:36] PaulePanter: Ping timeout: 256 seconds
[12:11:43] PaulePanter: has joined #ruby

2018-03-12

[09:35:04] PaulePanter: Remote host closed the connection
[09:36:57] PaulePanter: has joined #ruby

2018-02-24

[10:36:14] PaulePanter: Remote host closed the connection
[22:32:46] PaulePanter: has joined #ruby

2018-01-06

[02:26:48] PaulePanter: *.net *.split

2018-01-05

[03:06:44] PaulePanter: Remote host closed the connection
[09:31:09] PaulePanter: has joined #ruby

2017-12-31

[15:37:39] PaulePanter: Ping timeout: 248 seconds
[15:39:17] PaulePanter: has joined #ruby

2017-12-26

[06:54:14] PaulePanter: Remote host closed the connection
[07:36:05] PaulePanter: has joined #ruby
[09:14:36] PaulePanter: Quit: leaving
[09:14:46] PaulePanter: has joined #ruby

2017-12-09

[05:06:26] PaulePanter: *.net *.split
[05:14:00] PaulePanter: has joined #ruby

2017-12-07

[14:48:36] PaulePanter: *.net *.split
[14:55:09] PaulePanter: has joined #ruby

2017-12-01

[02:28:55] PaulePanter: has joined #ruby

2017-11-09

[02:51:17] PaulePanter: Ping timeout: 248 seconds
[02:52:54] PaulePanter: has joined #ruby

2017-10-05

[02:02:01] PaulePanter: Ping timeout: 240 seconds
[02:02:49] PaulePanter: has joined #ruby

2017-10-04

[07:36:23] PaulePanter: has joined #ruby

2017-08-14

[23:51:36] PaulePanter: *.net *.split
[23:56:44] PaulePanter: has joined #ruby

2017-06-20

[00:17:35] PaulePanter: *.net *.split

2017-05-19

[07:44:10] PaulePanter: Ping timeout: 240 seconds
[10:23:12] PaulePanter: has joined #ruby

2017-04-13

[15:10:50] PaulePanter: *.net *.split

2017-04-04

[06:26:15] PaulePanter: has joined #ruby

2017-04-03

[20:50:00] PaulePanter: Remote host closed the connection

2017-04-01

[17:54:16] PaulePanter: Ping timeout: 260 seconds
[17:56:03] PaulePanter: has joined #ruby

2017-03-20

[20:29:14] PaulePanter: *.net *.split

2016-06-30

[10:43:35] PaulePanter: Ping timeout: 250 seconds
[10:43:41] PaulePanter: has joined #ruby
[10:43:43] PaulePanter: has joined #RubyOnRails

2016-06-26

[11:07:19] PaulePanter: Hi. I have `require 'whenever/capistrano'` in my `Capfile`.
[11:07:56] PaulePanter: https://github.com/javan/whenever#capistrano-integration
[11:08:35] PaulePanter: I actually only want this to be run, when the stage/environment is production. It shouldn’t be run when doing `cap staging deploy`, as it’s only export data jobs.
[11:09:03] PaulePanter: Is there a Capistrano way to do that easily?
[11:10:23] PaulePanter: Sorry, the correct anchor is https://github.com/javan/whenever#capistrano-v3-integration.

2016-06-22

[07:04:45] PaulePanter: *.net *.split

2016-06-21

[18:47:37] PaulePanter: Hi. Any idea how to improve readability and performance of
[18:47:40] PaulePanter: arr.reject{|l| l[:date].nil?}.sort_by{|v| v[:date]}.reverse?
[18:47:54] PaulePanter: ? at end is part of the sentence.
[18:56:52] PaulePanter: aegis3121, jhass: Thanks a lot.

2016-06-17

[08:23:05] PaulePanter: Ping timeout: 244 seconds
[08:23:12] PaulePanter: has joined #ruby
[08:23:13] PaulePanter: has joined #RubyOnRails
[08:43:05] PaulePanter: Ping timeout: 252 seconds

2016-06-15

[05:48:55] PaulePanter: Hi. http://paste.debian.net/739332/
[05:49:15] PaulePanter: “undefined method `validate_yubikey_otp' for #<UserSessionsController:0xd06ed7c>” is the error I get.
[05:49:23] PaulePanter: Even namespacing the methods does not work.
[05:49:29] PaulePanter: This is with Rails 3.2.
[05:49:50] PaulePanter: !! #<NoMethodError: undefined method `validate_yubikey_otp' for YubikeyValidator:Module>
[05:49:50] PaulePanter: >> YubikeyValidator.validate_yubikey_otp("test")
[05:49:53] PaulePanter: >> YubikeyValidator::validate_yubikey_otp("test")
[05:49:55] PaulePanter: !! #<NoMethodError: undefined method `validate_yubikey_otp' for YubikeyValidator:Module>
[05:57:17] PaulePanter: sevenseacat: It didn’t find it then.
[05:57:20] PaulePanter: Let me try again.
[05:57:46] PaulePanter: arup_r: So I need `self.`.
[06:02:57] PaulePanter: arup_r: Awesome. That was it. Stupid me.
[06:03:09] PaulePanter: arup_r: Is there a way, to avoid prefixing this with the module name?
[06:13:17] PaulePanter: sevenseacat, arup_r: Thanks. Now it works in development mode with `include` and instance methods. I had that before several months ago, and hit errors.
[06:13:28] PaulePanter: I’ll test it later in production (with JRuby).

2016-06-11

[07:30:01] PaulePanter: Hi. If my user model has an attribute `yubikey`, how would you call a method validating if a given YubiKey ID matches the value stored in that attribute?
[07:31:01] PaulePanter: has_yubikey(yubikey_id) or has_yubikey?(yubikey_id) or something different?
[07:45:24] PaulePanter: tbuehlmann: Interesting idea. So it’d become `myuser ==? yubikey_id`?
[07:46:03] PaulePanter: Is that commonly used?
[07:46:24] PaulePanter: Searching for ==? in the Rails source code doesn’t give any results.
[07:59:28] PaulePanter: tbuehlmann: Yes, that is what it boils down to. :/
[08:00:29] PaulePanter: tbuehlmann: I wanted to add a level in between, to maybe do additional checks on the argument, or if in the future the requirements change.
[08:02:26] PaulePanter: tbuehlmann: Thank you!
[16:46:43] PaulePanter: Hi. With the Ruby debugger (byebug) how can I achieve the following?
[16:46:55] PaulePanter: x = something()
[16:47:22] PaulePanter: Now I want to step in the console after the state when x is assigned with manually calling something() in the debug console.
[16:47:34] PaulePanter: Using `next` always jumps after the method.
[16:47:59] PaulePanter: In this case, `byebug` could be moved after, but this is just an example.

2016-06-03

[10:25:04] PaulePanter: Ping timeout: 240 seconds
[10:25:42] PaulePanter: has joined #ruby
[10:25:43] PaulePanter: has joined #RubyOnRails

2016-05-31

[15:47:24] PaulePanter: Hi. With Rails (3.2), after doing a migration (`rake db:migrate`) does the application need to be restarted, when it was already running the right source?
[16:00:01] PaulePanter: jhass: Understood. Thank you.

2016-05-24

[08:17:04] PaulePanter: Hi. In a YAML file there is: my_key: [/bla/]
[08:17:26] PaulePanter: Now reading it in Ruby I get ["/bla/"] back.
[08:17:33] PaulePanter: As I want to user a matcher, that’s not so nice.
[08:17:39] PaulePanter: Any idea what I am missing.
[09:06:57] PaulePanter: >> require "yaml"; YAML.load("---\nfoo: [/test/]")
[09:07:18] PaulePanter: baweaver: That’s what I tried.
[09:11:40] PaulePanter: Any idea, how that can be worked around?
[09:14:39] PaulePanter: apeiros: Awesome. Thank you.
[09:15:17] PaulePanter: jhass: > You can choose from one of two YAML engines that ship with Ruby 1.9. By default Psych is used but the old unmaintained Syck may chosen.
[09:15:20] PaulePanter: http://ruby-doc.org/stdlib-1.9.3/libdoc/yaml/rdoc/YAML.html
[09:17:46] PaulePanter: jhass: What was your point?
[09:18:00] PaulePanter: http://ruby-doc.org/stdlib-2.1.5/libdoc/yaml/rdoc/YAML.html also says that Psych is used by default.
[09:21:15] PaulePanter: jhass: Ah, thank you!

2016-05-19

[10:46:36] PaulePanter: Hi. Is there something shorter than the command below to delete for records?
[10:46:43] PaulePanter: Something.find(2449669, 2449670, 2449671, 2449672).map(&:delete)
[10:48:32] PaulePanter: apeiros: Awesome. Thank you.
[10:49:03] PaulePanter: That probably will also do a better query.
[10:49:20] PaulePanter: apeiros: That worked!
[10:49:26] PaulePanter: apeiros: Indeed.
[10:50:27] PaulePanter: tbuehlmann: Indeed. But that’s even longer.

2016-05-18

[08:49:56] PaulePanter: Hi. Can `@exhibitions.map {|e| [ e.name, e.id ] }` be written even shorter?
[09:04:31] PaulePanter: jhass: Thank you!
[09:05:53] PaulePanter: jhass: Since Rails 4, if @exhibition is a model one could use `@exhibitions.pluck(:name, :id )`, I guess.
[09:06:27] PaulePanter: jhass: Yes, just wanted to mention it.

2016-05-17

[15:56:54] PaulePanter: Hi. Chrome 32 (Mozilla/5.0 (Windows NT 6.2; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1667.0 Safari/537.36) sends a HTTP format with semicolon instead of comma.
[15:56:58] PaulePanter: Missing template application/index with {:locale=>[:de], :formats=>["text/html;*/*"], :variants=>[], :handlers=>[:erb, :builder, :raw, :ruby, :jbuilder, :coffee, :haml]}. Searched in:
[15:57:34] PaulePanter: Any idea, how I could find out, if there is an operating system (tablet PC) sending wrong formats?
[16:53:21] PaulePanter: tubbo: Yeah, it’s one visitor causing this exception.
[16:53:46] PaulePanter: tubbo: There are some tablets out there, which you cannot update.
[16:54:12] PaulePanter: So I wanted to find out, how you deal with these kinds of things. I hoped to not be the only one.

2016-05-09

[06:32:12] PaulePanter: if language_ids.any?
[06:32:19] PaulePanter: bookings = bookings.where("bookings.language_id IN (?)", language_ids)
[06:34:05] PaulePanter: Can this be written without the if statement.
[06:34:48] PaulePanter: If NULL or the empty array are passed, I want that it shows all bookings.
[06:43:55] PaulePanter: sevenseacat: Well, in case of `[]`, no bookings are shown, in contrast to getting all bookings beforehand.
[08:45:27] PaulePanter: BaNzounet: Yes. There is a method `new?` or so.
[08:47:20] PaulePanter: BaNzounet: http://apidock.com/rails/ActiveRecord/Base/new_record%3F

2016-05-07

[17:02:45] PaulePanter: Hi. In https://github.com/tralles/cms-delta-2/blob/master/cms/app/models/documentable.rb#L25 this can be rewritten, so that Rails figures it out with associations, right?
[17:02:53] PaulePanter: self.project.constant(:doctype).where(:id => self.doctype).first.name
[17:04:16] PaulePanter: Looking further through it, I’d say Constant.find(self.doctype).name and rescue, if it’s nil.
[18:10:16] PaulePanter: Hi. wher can I find http://ruby-doc.org/docs/keywords/1.9/Object.html#method-i-rescue for current Ruby versions?
[18:10:34] PaulePanter: I am especially interested in the definition of `rescue`.
[18:12:51] PaulePanter: > Dynamic attribute-based finders are a mildly deprecated way of getting (and/or creating) objects by simple queries without turning to SQL.
[18:12:55] PaulePanter: from http://api.rubyonrails.org/classes/ActiveRecord/Base.html
[18:13:15] PaulePanter: As this is “mildly deprecated” what should be used instead?
[18:28:06] PaulePanter: Ox0dea: Thank you.
[18:28:49] PaulePanter: Ox0dea: http://ruby-doc.org/core-2.1.9/doc/keywords_rdoc.html
[18:28:57] PaulePanter: … why can’t I find it for Ruby 2.1?
[18:30:21] PaulePanter: Ox0dea: But nice to be pointed to C code. Very interesting.

2016-05-06

[09:38:52] PaulePanter: Hi. What’s the correct term for sum(&:column) and s(:column)?
[09:38:59] PaulePanter: *sum(:column)?
[09:39:12] PaulePanter: http://api.rubyonrails.org/classes/ActiveRecord/Calculations.html#method-i-sum
[09:39:26] PaulePanter: In database calculation?
[09:40:23] PaulePanter: Ruby in proc calculation?
[09:44:36] PaulePanter: http://api.rubyonrails.org/classes/Enumerable.html#method-i-sum

2016-05-03

[09:52:34] PaulePanter: Hi. How do you deploy your systems with systemd?
[09:52:42] PaulePanter: Do you use a systemd user session for the deploy user?
[09:52:49] PaulePanter: (Capistrano is used here.)
[09:52:55] PaulePanter: … with Puma application server.
[09:53:16] PaulePanter: The problem I am facing is, that systemctl restart can only be done as root.
[10:00:55] PaulePanter: Quit: Lost terminal
[10:01:08] PaulePanter: has joined #ruby
[17:03:40] PaulePanter: has joined #RubyOnRails
[17:05:34] PaulePanter: Deploying an application with Capistrano 3.4 using Puma as the application server, I read the Sidekiq author’s post about using the init system and not letting Capistrano restart the application server https://www.mikeperham.com/2014/09/22/dont-daemonize-your-daemons/.
[17:05:50] PaulePanter: task :restart do run "initctl restart sidekiq"
[17:05:57] PaulePanter: is the example in the end.
[17:06:16] PaulePanter: systemd is used here, so I use `systemctl restart puma`.
[17:06:34] PaulePanter: But the capistrano user has to be allowed to run that privileged command.
[17:06:47] PaulePanter: I adapted sudo.
[17:07:08] PaulePanter: As that post in almost two years old, are there currently other best practices?
[17:07:14] PaulePanter: Could you give me recommendations?
[17:11:17] PaulePanter: tubbo: Thank you for that hint.
[17:23:07] PaulePanter: tubbo: https://github.com/puma/puma/blob/master/docs/systemd.md just shows a “normal” service unit file, and further down says to use `systemd restart puma.service`.
[17:36:12] PaulePanter: https://github.com/capistrano/capistrano uses `execute :service, "sidekiq restart"` as the example.
[17:36:18] PaulePanter: In https://www.mikeperham.com/2014/09/22/dont-daemonize-your-daemons/
[17:36:31] PaulePanter: `run "initctl restart sidekiq"` is used.
[17:36:36] PaulePanter: Is there a difference?
[17:41:13] PaulePanter: tubbo, smathy: I mean more the difference between `run` and `execute`.
[17:45:30] PaulePanter: tubbo: Ok, that answer my question. Thank you!
[17:45:45] PaulePanter: Reading through lib/capistrano/dsl.rb, I even found `sudo`.
[17:46:22] PaulePanter: `sudo "systemctl restart puma"` should be the “best” thing for me then.
[17:47:56] PaulePanter: But I couldn’t find yet, where `execute` is defined.
[17:51:22] PaulePanter: tubbo: visudo is your friend.
[17:51:55] PaulePanter: deploy ALL=(root) NOPASS: /usr/bin/systemctl restart puma.service
[17:52:01] PaulePanter: … or something like it.
[17:52:42] PaulePanter: tubbo: I believe systemd already does too much, and prefer the one (small) program does one task very well.
[17:52:50] PaulePanter: But that’s always very subjective.
[17:53:09] PaulePanter: At least the folks recommended the sudo or polkit options.
[17:56:17] PaulePanter: tubbo: Yeah, that’s one point of view I could live with.
[19:42:24] PaulePanter: *.net *.split
[19:51:36] PaulePanter: has joined #RubyOnRails
[19:51:41] PaulePanter: has joined #ruby

2016-05-02

[18:28:12] PaulePanter: tubbo: I think you can contact the HTML specification group.
[18:30:03] PaulePanter: tubbo: Often numbers are used for the values, and the text is the visible label.
[18:30:10] PaulePanter: “visible label”.
[18:31:02] PaulePanter: smathy: So do you mean "include_blank: &nbsp;"?
[18:37:39] PaulePanter: tubbo: See the examples in https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select.