yuung

Activity Graph

Page 1 of 3 | Next »

2018-07-16

[08:11:11] yuung: has joined #ruby
[08:11:23] yuung: a while ago i found this really cool site that had Ruby's source code with annotations on the side describing the code, does anyone know/remember this site?
[08:11:26] yuung: has joined #RubyOnRails
[08:11:28] yuung: a while ago i found this really cool site that had Ruby's source code with annotations on the side describing the code, does anyone know/remember this site?
[08:25:40] yuung: it was omniref XD
[10:47:13] yuung: Quit: leaving

2017-08-07

[22:04:42] yuung: has joined #RubyOnRails
[22:05:11] yuung: i have an app that displays user-saved javascript and html on a page. what security concerns should I consider?
[22:05:56] yuung: it's basically a codepen clone - a user writes html/js and there is an autorefreshing iframe that updates periodically
[22:06:22] yuung: there is also a /show path for the page that just uses an erb template to display the html/js in full
[22:28:00] yuung: Ping timeout: 255 seconds

2016-07-22

[21:21:20] yuung: has joined #ruby
[21:21:47] yuung: anyone have experience connecting to an AWS emr hive server via ruby?
[21:43:45] yuung: Quit: leaving

2016-07-15

[20:08:08] yuung: i have a large csv file (~1 million lines) that i need to parse and transform with ruby. i don't want to read all of it into memory at once; rather i'd like to stream it. my question is, is there a method in IO that lets me read line-by-line, garbage collecting each old line after its been processed?
[20:08:48] yuung: jhass, cool - is it guaranteed to gc line by line?
[20:09:50] yuung: jhass i see; maybe not line by line, but in the end i don't want to read the whole file into memory at once. does CSV::foreach do that?
[20:10:06] yuung: jhass ah okay
[20:10:14] yuung: that makes more sense :)
[21:22:54] yuung: Ping timeout: 272 seconds
[22:24:16] yuung: has joined #ruby
[22:25:58] yuung: Client Quit

2016-07-14

[20:11:52] yuung: Ping timeout: 264 seconds
[20:32:46] yuung: has joined #ruby
[20:39:19] yuung: Ping timeout: 252 seconds
[21:03:30] yuung: has joined #ruby
[21:37:31] yuung: Quit: leaving

2016-07-07

[17:19:52] yuung: apeiros, toretore, mk. so i could theoretically create it, start it and stop it immediately
[17:19:59] yuung: if i really needed to
[17:20:35] yuung: apeiros could you give an example
[17:22:19] yuung: toretore exploration
[17:22:32] yuung: toretore /curiousity :)
[17:22:52] yuung: has left #ruby: ()

2016-05-24

[17:44:32] yuung: has joined #ruby
[17:50:51] yuung: Quit: leaving

2016-05-02

[18:27:55] yuung: has joined #RubyOnRails
[18:28:06] yuung: can seed objects be considered mocks?
[18:28:11] yuung: i mean, conceptually
[19:01:03] yuung: Ping timeout: 240 seconds
[19:58:02] yuung: has joined #RubyOnRails
[20:02:03] yuung: Ping timeout: 240 seconds

2016-04-08

[18:23:57] yuung: has joined #ruby
[18:27:12] yuung: silly q: why does ruby pass by reference? i always thought most scripting languages did pass by value.
[18:28:17] yuung: apeiros, why is that? isn't java pass by value?
[18:28:31] yuung: norc, how so?
[18:30:25] yuung: >> s = "a"; def foo(a); a = "b"; end; foo(s); p s
[18:33:27] yuung: norc, that's so weird; i literally did the same thing in IRB (gist here https://gist.github.com/johnmarinelli/c45e5440a42c0e78f7853df33a62b19d) and i got something different
[18:34:05] yuung: norc okay nvm don't look at that i had a brainfart
[18:37:58] yuung: norc got it. ty :)
[18:47:46] yuung: norc yes?
[19:04:38] yuung: Ping timeout: 244 seconds
[19:20:31] yuung: has joined #ruby
[20:06:00] yuung: Read error: Connection reset by peer
[21:06:38] yuung: has joined #ruby
[23:58:02] yuung: Quit: leaving

2016-03-30

[17:28:57] yuung: has joined #ruby
[18:10:04] yuung: Ping timeout: 240 seconds
[18:10:17] yuung: has joined #ruby
[18:45:36] yuung: Quit: leaving

2016-03-23

[02:01:27] yuung: has joined #ruby
[02:01:32] yuung: Client Quit

2016-03-22

[16:44:35] yuung: has joined #ruby
[18:45:02] yuung: Ping timeout: 260 seconds
[19:01:43] yuung: has joined #ruby
[19:06:37] yuung: Ping timeout: 260 seconds
[19:22:34] yuung: has joined #ruby
[19:27:26] yuung: Ping timeout: 248 seconds
[19:43:27] yuung: has joined #ruby
[19:48:28] yuung: Ping timeout: 264 seconds
[19:53:29] yuung: has joined #ruby
[20:52:04] yuung: Ping timeout: 264 seconds

2016-03-21

[15:57:01] yuung: has joined #ruby
[19:18:54] yuung: Ping timeout: 248 seconds
[19:34:54] yuung: has joined #ruby
[19:39:24] yuung: Ping timeout: 246 seconds
[19:55:30] yuung: has joined #ruby
[20:00:28] yuung: Ping timeout: 264 seconds
[20:08:49] yuung: has joined #ruby
[20:46:48] yuung: Ping timeout: 244 seconds
[21:34:48] yuung: has joined #ruby
[21:39:27] yuung: Quit: leaving

2016-03-18

[17:14:08] yuung: has joined #ruby
[17:14:39] yuung: i have a string and an array of words i'd like to replace within that string. does ruby have a method for this or am i going to have to iterate over the array?
[17:15:06] yuung: for ex, `"this is my string", ["is", "string"] should be replaced ["IS", "STRING"] respectively
[17:15:48] yuung: 0x0dea it's a contrived example
[17:16:42] yuung: 0x0dea i see - but what if i only want 'is' and 'string' to be uppercased?
[17:17:07] yuung: apeiros, i just want to uppercase them :)
[17:17:18] yuung: should have made that clearer, my bad
[17:17:43] yuung: ahhhh nice
[17:17:49] yuung: i'll just pad the words with spaces too
[17:18:37] yuung: nice, nice
[17:19:00] yuung: 0x0dea /\b#{union}\b/?
[17:20:30] yuung: hanmac, 0x0dea, apeiros, ty very much! :)
[18:51:17] yuung: Ping timeout: 250 seconds
[19:04:09] yuung: has joined #ruby
[19:14:51] yuung: Ping timeout: 268 seconds
[19:46:26] yuung: has joined #ruby
[19:47:19] yuung: Client Quit

2016-03-16

[18:42:30] yuung: has joined #ruby
[18:44:51] yuung: why is lisp an esoteric language?
[18:46:23] yuung: Vlat- i would argue that it's been around too long to be an esoteric language
[18:46:40] yuung: Vlat- /used by a lot of institutions. but idk, it's a subjective term
[19:34:54] yuung: Ping timeout: 248 seconds
[19:51:48] yuung: has joined #ruby
[22:45:18] yuung: Ping timeout: 268 seconds
[22:46:04] yuung: has joined #ruby
[22:58:15] yuung: Ping timeout: 244 seconds
[23:52:32] yuung: has joined #ruby
[23:55:35] yuung: Client Quit

2016-03-12

[02:33:05] yuung: Quit: leaving

2016-03-11

[18:20:24] yuung: has joined #ruby
[18:29:28] yuung: does anyone have experience connecting to salesforce marketing cloud via Net::SFTP? i can't connect due to their 'enhanced ftp' feature
[18:33:04] yuung: bougyman, it's sftp and enhanced ftp
[18:33:36] yuung: bougyman, when i connect via command line, i have to go through some partial authentication thing, then enter my password as normal
[18:33:44] yuung: shevy, there's a gem for it
[18:35:17] yuung: shevy yep.
[18:35:41] yuung: but i've never seen this enhanced ftp before and net-sftp doesn't seem to handle it
[18:41:49] yuung: crime it seems like it. leave it to sf to make everyones life harder
[20:10:06] yuung: Ping timeout: 248 seconds
[20:31:02] yuung: has joined #ruby
[21:17:28] yuung: how can i change schemas using the `pg` gem?
[21:23:15] yuung: slash_nick you're totally right - i'll just prepend schema_name to table :)
[21:23:19] yuung: slash_nick thanks!

2016-03-09

[00:56:49] yuung: Read error: Connection reset by peer
[00:57:07] yuung: has joined #ruby
[00:57:07] yuung: has joined #RubyOnRails
[01:21:17] yuung: Ping timeout: 244 seconds
[01:21:53] yuung: has joined #ruby
[01:21:53] yuung: has joined #RubyOnRails
[01:27:12] yuung: Ping timeout: 246 seconds

2016-03-08

[00:53:35] yuung: has joined #ruby
[02:03:13] yuung: Quit: leaving
[18:37:22] yuung: i'm trying to use VCR in my rails app, and in the method i'm trying to test, i use Hash#transform_keys which is a Rails method. it seems that when i test with VCR, this method isn't added. how can i amend this?
[18:39:25] yuung: has joined #RubyOnRails
[18:39:27] yuung: i'm trying to use VCR in my rails app, and in the method i'm trying to test, i use Hash#transform_keys which is a Rails method. it seems that when i test with VCR, this method isn't added. how can i amend this?
[18:41:11] yuung: Read error: Connection reset by peer
[18:41:42] yuung: has joined #RubyOnRails
[18:52:57] yuung: is anyone familiar with using the VCR gem and Rails?
[18:54:43] yuung: it's complaining about a Rails-implemented method
[18:54:50] yuung: but still records the http request o_O
[19:12:44] yuung: https://gist.github.com/johnmarinelli/0e72a3ffc72c6aed648a <--- link to VCR/Rails problem
[20:18:11] yuung: Ping timeout: 248 seconds
[21:23:39] yuung: has joined #RubyOnRails
[22:31:26] yuung: has joined #ruby
[22:31:57] yuung: i'd like to test a method that returns an object in its `rescue` clause. how can i do this with rspec?
[22:33:52] yuung: Cohedrin, aegis3121, yeah - i want to know how i can raise this exception in a test?
[22:34:15] yuung: Cohedrin OpenURI::HTTPError
[22:34:39] yuung: aegis3121 yep
[22:37:32] yuung: aegis3121, Cohedrin, hm - so i don't think i'll really be able to simulate the way i'd like. but i'll take what you said into consideration. thanks!
[22:37:57] yuung: SaintAardvark, http://stackoverflow.com/questions/15707940/rake-before-task-hook might help
[23:59:08] yuung: SaintAardvark, http://stackoverflow.com/questions/15707940/rake-before-task-hook might help
[23:59:20] yuung: accident, my bad.

2016-03-07

[21:20:25] yuung: has joined #ruby
[21:36:27] yuung: Read error: Connection reset by peer
[21:39:29] yuung: has joined #ruby
[22:11:10] yuung: Ping timeout: 248 seconds
[22:15:26] yuung: has joined #ruby
[22:20:51] yuung: Quit: leaving

2016-01-27

[05:11:10] yuung: has joined #ruby
[06:56:21] yuung: Quit: Leaving

2015-12-28

[00:07:37] yuung: pontiki, i was trying to create a helper function that does it for me: https://gist.github.com/johnmarinelli/cde642d098359968e3f4 however, in my yaml file, when i try to use create_applicants it gives me some cryptic syntax error
[00:07:48] yuung: i'm assuming it's because yaml isn't parsing the '\n' or something
[00:08:00] yuung: if i could handroll a factory that would be much easier, because I haven't used factorygirl before
[00:21:43] yuung: so I don't understand how i'm supposed to generate fixtures with factorygirl; i used build() and tried assert_equal 1, Applicant.count but it's 0.
[00:22:06] yuung: googling doesn't really give me clear results for an intro to factorygirl with rails' default tests either :(
[00:23:45] yuung: err - nvm. create() instead of build(). i'll come back when i have questions that are more vague >>
[02:05:45] yuung: how can i get the beginning and end of a week, given a string in format 'YY-WW'?
[02:52:06] yuung: existensil, thanks!
[03:20:16] yuung: for some reason, i'm getting an html response with the following setup: https://gist.github.com/johnmarinelli/1617fae143eebb613849
[03:20:28] yuung: anyone see why this is happening?
[03:40:44] yuung: Quit: Leaving

2015-12-27

[22:51:46] yuung: has joined #RubyOnRails
[23:37:51] yuung: is there a way to dynamically create fixtures? something like, <%= create_user(created_at: '2014-01-01') %>
[23:37:59] yuung: in users.yml
[23:38:36] yuung: tasaif omg i forgot all about those
[23:38:41] yuung: okay thank you *leaves blushing*
[23:48:55] yuung: tasaif, i've decided not to go the seed route;
[23:49:22] yuung: tasaif i figure it's more for prerequisite db stuff than testing
[23:49:31] yuung: tasaif, like, if i need an admin account
[23:49:35] yuung: before i can do anything
[23:52:59] yuung: tasaif, i know - but i'd rather just use seeds for development environment
[23:53:04] yuung: but *that's just me*
[23:53:43] yuung: pontiki, that's what I was considering, maybe I'll go that route. essentially i just need a way to generate X number of users within a date range, so it'd be like create_user(range, num_of_users)
[23:53:52] yuung: create_users**

2015-12-04

[20:29:25] yuung: has joined #ruby
[20:48:15] yuung: i'm working on a class that works with matrices, how can i call the [] operator from within a class function?
[20:49:58] yuung: 0x0dea, havenwood, sure - one sec
[20:50:29] yuung: 0x0dea, havenwood, wait nevermind, got it
[20:50:32] yuung: 0x0dea, havenwood, thanks
[22:16:02] yuung: Quit: Leaving

2015-11-14

[04:25:30] yuung: Quit: Leaving

2015-11-13

[23:16:00] yuung: has joined #ruby

2015-08-15

[01:42:30] yuung: Quit: Leaving

2015-08-14

[06:45:17] yuung: has joined #RubyOnRails
[06:45:53] yuung: so i'm trying to use TravisCI with my project. it complains that there is no secret_key_base and to set it in config/secrets.yml; however i'd rather not upload the secrets.yml to my repo. how can i circumvent this?
[06:46:14] yuung: i've tried putting env: secret_key_base="$(bundle exec rake secret)" to no avail in .travis.yml
[06:47:38] yuung: sevenseacat, i'd do that but i can't edit my env vars on my production server (shared hosting)
[06:47:48] yuung: at least, i think i can't...i'm going to try
[06:48:02] yuung: sevenseacat yeah - but i pull from that repo in production
[06:49:04] yuung: i just made a config/secrets.yml file on the server. sloppy, i know, but like i said - i can't set env vars
[06:50:09] yuung: because secrets.yml isn't in the repository, so it's complaining that it can't find a secret_key_base
[06:51:10] yuung: alright - i was trying to avoid that because wouldn't i have to remember to git checkout config/secrets.yml for every pull?
[08:11:40] yuung: Quit: Leaving
[19:18:12] yuung: has joined #ruby
[19:19:46] yuung: what is this syntax? https://gist.github.com/johnmarinelli/f95f290332f3b6ddc3ea
[19:20:49] yuung: ah i see. thanks
[19:41:58] yuung: Ping timeout: 246 seconds
[23:07:26] yuung: has joined #ruby
[23:07:42] yuung: if my parent class has a mixin, will the child inherit the mixin methods?
[23:08:24] yuung: .............okay, so it doesn't
[23:08:34] yuung: then i must be doing something wrong
[23:17:48] yuung: [spoiler], https://gist.github.com/johnmarinelli/05881902ddf8f8deaf63. just wondering why i need to call Base.get instead of self.get
[23:19:37] yuung: shevy ah, that worked, heh
[23:20:00] yuung: does self.class look up the inheritance heirarchy where just self doesn't?
[23:22:07] yuung: ahh, okay
[23:24:13] yuung: [spoiler], Ox0dea, shevy, thanks

2015-06-27

[02:13:03] yuung: xploshioon (tbh, i'd say that just making a quick user resource with devise would be easier if you're going to have relationships)
[02:13:10] yuung: it'd save you a lot of trouble in the future
[02:16:13] yuung: xploshioon, set a :before_filter in your controllers to insert the user email in the url
[02:16:36] yuung: before_filter basically runs some function before your show, create, update, whatever you choose
[02:20:04] yuung: xploshioon, you were doing it like ?username=xyz, right?
[02:20:09] yuung: that's what i had thought the whole time
[02:22:24] yuung: okay - now i'm just confused how it's working if users isn't a resource o_O
[02:22:38] yuung: are you manually parsing the url?
[02:22:53] yuung: @xploshioon
[02:26:46] yuung: xploshioon so you're manually parsing the url right?
[02:27:32] yuung: i'd really suggest just using devise and creating the relationships like that. if you don't want to do that, try just using resources :payments
[02:27:44] yuung: and then i guess you'd have to set the user in the payments controller
[02:32:16] yuung: xploshioon i see. hm
[02:33:13] yuung: xploshioon, you could set up a rake task that would run every day/week whatever to query the API for deleted/new users, and update accordingly
[02:33:50] yuung: xploshioon if you use resources, you'd still be able to use the URL
[02:34:11] yuung: i mean cronjob, not rake task ^
[02:41:53] yuung: xploshioon,could you gist your payments controller
[02:44:41] yuung: xploshioon and the whole debug page, not just the error
[02:47:56] yuung: xploshioon, have you tried adding :id to your payment_params
[02:48:19] yuung: params.require(:payment).permit(..., :id)
[02:48:28] yuung: not sure if it would work but worht a try
[02:50:56] yuung: xploshioon, your user_id is a payment object, i'm assuming that's an error?
[02:52:29] yuung: xploshioon,could you gist the stack trace too
[02:57:37] yuung: xploshioon, i have to go right now, first place i'd look is the controller though; I don't think it has anything to do with the routes
[02:57:44] yuung: Quit: Leaving