haxx0r

Activity Graph

Page 1 of 5 | Next »

2019-08-06

[14:40:49] haxx0r: has joined #ruby
[14:40:49] haxx0r: has joined #RubyOnRails
[15:46:04] haxx0r: Remote host closed the connection

2019-07-31

[06:03:26] haxx0r: has joined #ruby
[06:03:26] haxx0r: has joined #RubyOnRails
[09:02:59] haxx0r: Remote host closed the connection
[16:49:35] haxx0r: has joined #ruby
[16:49:35] haxx0r: has joined #RubyOnRails
[17:28:51] haxx0r: Remote host closed the connection

2019-07-11

[06:40:13] haxx0r: has joined #RubyOnRails
[06:40:14] haxx0r: has joined #ruby
[06:45:00] haxx0r: def active_for_authentication?
[06:45:03] haxx0r: in my User model
[06:45:10] haxx0r: but when i login via devise, it never hits
[06:45:13] haxx0r: did they remove that?
[19:55:05] haxx0r: Ping timeout: 258 seconds

2019-07-10

[01:11:51] haxx0r: has joined #ruby
[01:11:51] haxx0r: has joined #RubyOnRails
[04:44:34] haxx0r: how to validate that the PGP key a user provided to encrypt emails is valid
[04:46:34] haxx0r: no ruby gem to check it? thats bad
[04:47:08] haxx0r: i wanna run like `validates :pgp_key, pgp: true`
[04:48:43] haxx0r: that gem is just a wrapper class for the shell, isn't?
[04:49:33] haxx0r: mmh. i'll cook food and will recheck in 20 minutes
[05:03:43] haxx0r: lets see, i'll check that gem now
[06:26:17] haxx0r: Remote host closed the connection

2019-07-09

[02:09:36] haxx0r: has joined #ruby
[02:09:36] haxx0r: has joined #RubyOnRails
[02:10:31] haxx0r: i have a rails project and want to listen on a local running RPC client every second for new stuff. i wonder what would be best practice to have this running in a way that it can literally run forever and won't be interrupted
[02:14:07] haxx0r: should i use this gem https://github.com/thuehlinger/daemons ? wonder how to integrate it into rails
[05:54:53] haxx0r: i figured already
[05:55:14] haxx0r: Uploaded file: https://uploads.kiwiirc.com/files/31e76e51244189c45ac6ecb582401fc7/pasted.txt
[05:55:32] haxx0r: so i can start and stop it as a background process
[05:56:05] haxx0r: alternatively i could make a cronjob that gets called every minute and the cronjob itself will work 5 times with 10 seconds delays
[05:56:09] haxx0r: no idea which idea is better
[09:55:48] haxx0r: rails > all
[09:55:53] haxx0r: everybody else is just clickbaiting
[12:16:39] haxx0r: check against ActiveModel Validations
[12:16:53] haxx0r: https://guides.rubyonrails.org/active_record_validations.html
[19:53:46] haxx0r: Ping timeout: 244 seconds

2019-07-07

[02:43:35] haxx0r: has joined #RubyOnRails
[02:43:36] haxx0r: has joined #ruby
[16:10:56] haxx0r: Remote host closed the connection

2019-07-06

[19:52:38] haxx0r: Ping timeout: 258 seconds

2019-07-05

[18:38:14] haxx0r: has joined #ruby
[18:38:14] haxx0r: has joined #RubyOnRails
[18:38:31] haxx0r: Uploaded file: https://uploads.kiwiirc.com/files/8de97ca496fbfd5afb6fce94bde2a61d/pasted.txt
[18:38:48] haxx0r: what's better code?
[19:07:40] haxx0r: i think so
[19:51:42] haxx0r: Ping timeout: 245 seconds

2019-07-03

[10:38:02] haxx0r: Remote host closed the connection

2019-07-02

[09:20:28] haxx0r: has joined #ruby
[09:20:28] haxx0r: has joined #RubyOnRails
[09:21:17] haxx0r: this is really weired. so i have strings like "DPR5G7-69LNE-XXDNXY" which is 19 chars long. and i have a migration `t.string :reference, null: false, limit: 30` yet i get errormessage: `Mysql2::Error: Data too long for column 'reference' at row 1: `
[09:21:35] haxx0r: so i'm smart and removed the limit. just plain old ` t.string :reference, null: false, index: true
[09:21:41] haxx0r: still get the errormesage ?!
[09:27:25] haxx0r: i figured out already
[09:27:36] haxx0r: it's stupid to have `belongs_to :asset` and a field called `asset`
[09:27:41] haxx0r: thought that will work ^.^
[09:27:57] haxx0r: which actually does work, but yeah, confusions
[09:33:35] haxx0r: ActiveJobs
[09:33:51] haxx0r: asynchronus executions of code, via Sidekiq most likely
[09:34:01] haxx0r: https://edgeguides.rubyonrails.org/active_job_basics.html
[09:39:19] haxx0r: something like async code executions
[09:39:41] haxx0r: user signs up. sending out the email.
[09:39:50] haxx0r: but if exception in the email, user won't be saved (lol)
[09:39:53] haxx0r: https://github.com/mperham/sidekiq check that out
[09:40:41] haxx0r: literally everybody needs it
[09:40:49] haxx0r: since ActionMailer is running async now adays
[09:40:54] haxx0r: so is ActiveStorage
[09:44:40] haxx0r: ./app/lib because it's autoloaded
[09:46:20] haxx0r: everything in /app is autoloaded
[09:46:32] haxx0r: you can also call it /app/uselesscode
[09:46:40] haxx0r: but /app/lib is common place
[09:46:51] haxx0r: but depending on your code, there might be better places
[10:00:46] haxx0r: app/controllers is for everything related to the browser
[10:00:56] haxx0r: app/models for your models
[10:01:00] haxx0r: app/views self explained
[10:01:32] haxx0r: and app/lib for something like `Cronjob` or maybe `StripeAPIWrapper` or something like `BitcoinRPC`
[10:01:46] haxx0r: like code that is needed for your app, but dont belong to model
[10:09:50] haxx0r: ./app/assets
[10:10:06] haxx0r: or better to say
[10:10:13] haxx0r: ./app/assets/javascripts/jquerfiletree
[10:10:20] haxx0r: and then require it from the application.js
[10:10:34] haxx0r: you really need to read about this stuff and/or watch some railscasts or other tutorials
[10:10:38] haxx0r: rails is magic
[10:16:10] haxx0r: so make a controller that calls the ruby script.
[10:25:19] haxx0r: apparantly you dont know what your're doing
[10:26:08] haxx0r: we don't care about PHP since Ruby and Rails are superior
[11:33:18] haxx0r: nobody can help you with that littel bit of code
[11:43:28] haxx0r: is that a rails controller?
[11:48:10] haxx0r: if this is your controller, i don't even want to help you
[11:48:13] haxx0r: this is not a rails controller
[11:48:18] haxx0r: a rails controller would be something like
[11:48:56] haxx0r: def folders; folder = JqueryFolder.run(params[:directory}); render json: folder: end
[11:53:06] haxx0r: i dont understand your problem nor does anybody else in this channel
[11:53:13] haxx0r: you need to learn basics of ruby and ruby controllers
[11:53:19] haxx0r: i wont reply you anymore. sorry mate
[12:31:30] haxx0r: Ping timeout: 272 seconds
[12:35:15] haxx0r: has joined #ruby
[12:35:15] haxx0r: has joined #RubyOnRails
[13:29:24] haxx0r: you need to youse DECIMAL
[13:29:40] haxx0r: t.decimal :amount, precision: 20, scale: 8
[13:29:46] haxx0r: (for cryptocurrency)
[13:29:58] haxx0r: also, if you deal with money, checkout `gem money`
[13:30:05] haxx0r: it does allf or you
[13:30:10] haxx0r: and/or `money-rails`
[14:33:19] haxx0r: dafuq why?
[14:33:29] haxx0r: good luck using integer with crypot
[14:33:45] haxx0r: show me how to store 1_000_000_000.12345678 DOGE Coin
[14:40:12] haxx0r: yeah, he's also quite stupid for saying integer is the only solution
[14:40:20] haxx0r: if you're making a shop and have 2 digit prices: ok.
[14:40:33] haxx0r: if you go for financial application, do not do integer
[15:56:34] haxx0r: any chance to throw a `Proc` into `validates_numericality_of` so that the value we check against is depending on an association?
[16:44:03] haxx0r: to my own answer: yes it's working `validates_numericality_of :amount, less_than: :minimum_amount` given a symbol will be executed correctly

2019-07-01

[07:40:53] haxx0r: Remote host closed the connection

2019-06-30

[09:18:57] haxx0r: Quit: Ping timeout (120 seconds)
[12:39:58] haxx0r: has joined #RubyOnRails
[12:39:59] haxx0r: has joined #ruby

2019-06-29

[05:25:45] haxx0r: NameError: uninitialized constant ActiveRecord::ConnectionAdapters::ColumnMethods
[05:25:49] haxx0r: that doesn't exist anymore?
[05:28:22] haxx0r: i wanna override it in a gem
[05:42:23] haxx0r: kurly, well, it's not working
[05:42:35] haxx0r: Uploaded file: https://uploads.kiwiirc.com/files/64a278b6977f9786d8dda4adb5b92eb3/pasted.txt
[05:42:44] haxx0r: i put it either in a gem, or directly in an initializer
[05:42:47] haxx0r: simply won't work
[05:44:03] haxx0r: from my migration i get `NameError: uninitialized constant ActiveRecord::ConnectionAdapters::ColumnMethods
[05:44:26] haxx0r: i did the exact same thing in a rails 5.1 project
[05:47:52] haxx0r: `ActiveRecord::ConnectionAdapters::TableDefinition.class_eval do
[12:27:32] haxx0r: Ping timeout: 245 seconds
[12:37:37] haxx0r: has joined #ruby
[12:37:37] haxx0r: has joined #RubyOnRails
[16:32:39] haxx0r: need help with testing
[16:32:46] haxx0r: Uploaded file: https://uploads.kiwiirc.com/files/b4220e13511c2d31832377e6c94a91b9/pasted.txt
[16:33:22] haxx0r: is that the right place? is that the right way? does it belong into `deposit_address_spec` or is it correct at the user?
[16:35:24] haxx0r: but i think, i would rather return the address or if limit is exceeding raise an exception, than returning true/false

2019-06-28

[12:27:18] haxx0r: Ping timeout: 252 seconds
[14:15:39] haxx0r: has joined #ruby
[14:15:39] haxx0r: has joined #RubyOnRails
[17:24:27] haxx0r: i need to build a ledger for accounting (deposits, trades, withdrawals etc). obviously i need to avoid all the rounding issues that `float` has. can i use `t.decimal(precision: 16, scale: 6)` and i'm save with rounding errors?
[17:24:36] haxx0r: ah, rails question :eyeroll:
[17:24:44] haxx0r: i need to build a ledger for accounting (deposits, trades, withdrawals etc). obviously i need to avoid all the rounding issues that `float` has. can i use `t.decimal(precision: 16, scale: 6)` and i'm save with rounding errors?
[17:29:46] haxx0r: pavelz, isn't c an array?
[17:30:45] haxx0r: isn't it .flatten?
[17:31:17] haxx0r: yeah, i know the money gem. but i feel it's not the best for a crypto exchange platform
[18:06:23] haxx0r: it's counting down all the way and at the end it's counting together
[18:06:52] haxx0r: def lucas_number(n)
[18:07:03] haxx0r: then you see what it does internally
[18:09:14] haxx0r: https://repl.it/repls/CalmCourageousSlash
[18:09:23] haxx0r: do it this way and you see how it's counting down with recursion
[18:10:14] haxx0r: and if you wanna see how deep the recursion goes, i'll show you how to do that
[18:12:53] haxx0r: https://repl.it/repls/CalmCourageousSlash
[19:50:46] haxx0r: i want to generate generate unique identifiers like `AGBBL3W-ZKPXXL-JZFYWR` or `TAN5OL-RTLX2-4ELIEV` or `OPDTA6-VNN3X-E62FSR`. is there any possibility to do it based on a seed like the current processortime, so i don't need to recheck my database that thisn thing is unique, instead i can just trust that the seed will give me unique things?
[20:11:54] haxx0r: and now we do it how in ruby? :D
[20:16:28] haxx0r: that's not helping since it's horrible to index in database
[20:16:32] haxx0r: it's too big
[20:17:09] haxx0r: mysql. but you wanna make 25,000,000 records or more with huge uuids?
[20:18:45] haxx0r: i need customers to tell me the numbers, i dont want them to tell me so many characters. hence just 12 or 15 digits
[20:25:46] haxx0r: i'll build my own generator right now as a rails style plugin
[20:25:48] haxx0r: has_identifier
[21:00:34] haxx0r: Uploaded file: https://uploads.kiwiirc.com/files/43880abca703e49e02a828c66541f59e/pasted.txt
[21:00:42] haxx0r: how to get the prefix?
[21:00:58] haxx0r: class Bla; has_identifier("RE")
[21:14:03] haxx0r: the one i pasted
[21:14:11] haxx0r: but prefix isn't working
[21:14:16] haxx0r: i think i do the whole concern thing wrong
[21:17:54] haxx0r: can i feed a seed to create random stuff?
[21:19:27] haxx0r: well, kraken.com uses same model
[21:20:53] haxx0r: so i have
[21:21:15] haxx0r: Prefix 1490116119384765625-1490116119384765625-1490116119384765625
[21:21:28] haxx0r: i'm not sure about collision. but the universe is big i think
[21:22:31] haxx0r: 3**5**26 ?
[21:23:29] haxx0r: i mean, just 3**5**10
[21:24:01] haxx0r: i personally would say it's safe to use and practically it won't ever create collusions, but i also didn't study science nor am i good at math
[21:27:55] haxx0r: Uploaded file: https://uploads.kiwiirc.com/files/71ea730ef350b8325e683538539d240e/pasted.txt
[21:28:00] haxx0r: allright, that code works perfect
[21:29:12] haxx0r: but fair enough, lets bring numbers inside.
[21:29:22] haxx0r: then we are safe with collisions?
[21:36:12] haxx0r: Array.new(i){ [*'0'..'9',*'A'..'Z'].sample }.join
[21:36:19] haxx0r: &>> Array.new(i){ [*'0'..'9',*'A'..'Z'].sample }.join
[21:36:29] haxx0r: &>>Array.new(i){ [*'0'..'9',*'A'..'Z'].sample }.join
[21:36:50] haxx0r: &>> Array.new(10){ [*'0'..'9',*'A'..'Z'].sample }.join
[21:40:12] haxx0r: *?a..?k, *?m..?z,
[21:40:16] haxx0r: so you exclude some chars?
[21:41:01] haxx0r: h I O are missing?
[21:41:16] haxx0r: [*?1..?9, *?a..?k, *?m..?z, *?A..?H, *?J..?N, *?P..?Z]
[21:42:18] haxx0r: i dont need base58
[21:42:38] haxx0r: because people too stupid to differ I i l
[21:43:19] haxx0r: TIL what base58 is
[21:43:32] haxx0r: ACTION putsa photo of havenwood over his door
[21:45:22] haxx0r: so then i don't need to check on validity anymore because i can assume zero collision, ya?
[21:46:57] haxx0r: yea but that means always 1 extra mysql query.
[21:47:15] haxx0r: if it's 1 in 25 million that is ok. record won't be created then. i can live with that
[21:47:34] haxx0r: good question
[21:49:38] haxx0r: i'll go sleep
[21:49:41] haxx0r: thanks so far
[21:49:43] haxx0r: have a good nite

2019-06-27

[01:08:26] haxx0r: Remote host closed the connection
[07:14:33] haxx0r: has joined #RubyOnRails
[07:14:46] haxx0r: anybodu know when 6.0 is official?
[07:28:40] haxx0r: i would like actionmailbox :)
[08:01:35] haxx0r: NoMethodError (undefined method `ArgumentError'
[08:01:39] haxx0r: how is that possible
[08:07:31] haxx0r: raise ::ArgumentError if used inside a module somehow
[08:32:39] haxx0r: has joined #ruby
[08:32:41] haxx0r: curl --user user
[08:32:46] haxx0r: what's the equivalent for net http?
[10:32:09] haxx0r: in shell i call arguments to rpc like this ` ./rpc -testnet listtransactions * 1000 0 true`
[10:32:21] haxx0r: i can't figure out how to implement that in ruby net/http
[12:26:31] haxx0r: Ping timeout: 246 seconds
[13:22:01] haxx0r: has joined #ruby
[13:22:01] haxx0r: has joined #RubyOnRails

2019-06-26

[12:20:16] haxx0r: Remote host closed the connection
[12:54:53] haxx0r: has joined #RubyOnRails
[16:21:43] haxx0r: Ping timeout: 245 seconds
[16:32:42] haxx0r: has joined #RubyOnRails

2019-06-25

[12:25:29] haxx0r: Ping timeout: 244 seconds
[13:12:23] haxx0r: has joined #RubyOnRails
[20:49:14] haxx0r: Ping timeout: 244 seconds
[23:49:12] haxx0r: has joined #RubyOnRails

2019-06-24

[03:32:47] haxx0r: has joined #RubyOnRails
[12:23:48] haxx0r: Ping timeout: 245 seconds
[12:26:56] haxx0r: has joined #RubyOnRails

2019-06-23

[01:21:09] haxx0r: Ping timeout: 244 seconds
[04:14:14] haxx0r: has joined #RubyOnRails
[22:35:58] haxx0r: Quit: Ping timeout (120 seconds)

2019-06-22

[03:25:53] haxx0r: Ping timeout: 248 seconds
[03:29:35] haxx0r: has left #RubyOnRails: ()
[03:29:37] haxx0r: has left #ruby: ()
[06:41:06] haxx0r: has joined #RubyOnRails
[06:42:00] haxx0r: i run 2 domains for the same rails-app. is it possible if user log in at site1.com he's also logged in at site2.com if he visits it?
[12:40:36] haxx0r: MrCrackPotBuilde i don't understand.
[12:40:55] haxx0r: the cookie i send needs to be modified, ya? i always thought browsers have cookie storage by TLD
[12:53:01] haxx0r: i'll try the domain all thing.
[12:53:16] haxx0r: the subdomain thing i did few years ago, won't work for different TLDs
[15:03:47] haxx0r: Remote host closed the connection
[18:03:14] haxx0r: has joined #RubyOnRails

2019-06-21

[03:57:59] haxx0r: has joined #RubyOnRails