<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Speak My Name - Latest Comments</title><link>http://speakmyname.disqus.com/</link><description></description><atom:link href="https://speakmyname.disqus.com/comments.rss" rel="self"></atom:link><language>en</language><lastBuildDate>Sun, 12 Dec 2021 23:14:17 -0000</lastBuildDate><item><title>Re: HTTP request debugging in Go with httputil</title><link>http://speakmy.name/2014/07/29/http-request-debugging-in-go/#comment-5643440766</link><description>&lt;p&gt;And even after 7 years :)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">km</dc:creator><pubDate>Sun, 12 Dec 2021 23:14:17 -0000</pubDate></item><item><title>Re: HTTP request debugging in Go with httputil</title><link>http://speakmy.name/2014/07/29/http-request-debugging-in-go/#comment-5520155147</link><description>&lt;p&gt;cookies will be visible in the request headers – they're sent as "Cookie:" http header&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">morhekil</dc:creator><pubDate>Fri, 03 Sep 2021 01:08:40 -0000</pubDate></item><item><title>Re: HTTP request debugging in Go with httputil</title><link>http://speakmy.name/2014/07/29/http-request-debugging-in-go/#comment-5516230328</link><description>&lt;p&gt;is it possible to verify which cookies are really sent out? They are stored in Client struct and are selected dependent the URL...&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">frank</dc:creator><pubDate>Tue, 31 Aug 2021 05:30:16 -0000</pubDate></item><item><title>Re: Automatic system backups with backup gem and some shell scripting - part 3, large file structures</title><link>http://speakmy.name/2014/01/12/automatic-backups-with-ruby-and-linux-shell-part-3/#comment-4759933266</link><description>&lt;p&gt;Hi Marcel,&lt;/p&gt;&lt;p&gt;du is going to show you disk space occupied by a directory including all its hard links, so it makes sense that you see all of your backups as having the same size.&lt;/p&gt;&lt;p&gt;You can get a size of linked files separately to compare that, or you can look at all your back directories together - e.g. look here for some good explanations and command examples: &lt;a href="https://unix.stackexchange.com/questions/118203/how-to-get-folder-size-ignoring-hard-links" rel="nofollow noopener" target="_blank" title="https://unix.stackexchange.com/questions/118203/how-to-get-folder-size-ignoring-hard-links"&gt;https://unix.stackexchange....&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">morhekil</dc:creator><pubDate>Thu, 16 Jan 2020 17:34:20 -0000</pubDate></item><item><title>Re: Automatic system backups with backup gem and some shell scripting - part 3, large file structures</title><link>http://speakmy.name/2014/01/12/automatic-backups-with-ruby-and-linux-shell-part-3/#comment-4759389013</link><description>&lt;p&gt;Hi there. Thank you for making this post. I focused in on part 3, and use the script in a cronjob to do a backup twice a day, at Noon and 4:00pm. So far, so good.&lt;/p&gt;&lt;p&gt;What I don't get is, that although hard links are used, the target disk is filling up. So far, I haven't been able to find the proper commands to check the actual used disk space. The ones I know of, du -sh for example, or ncdu, show the disk is at 100% capacity. Every backup shows as the same size as the previous backup (1.9T). I know this can't be true, because there are many backups stored on the target disk, which is only a 6TB drive.&lt;/p&gt;&lt;p&gt;And I find it highly unlikely that between the first original (full) backup and - for example - the last one, files have been changed/added so the backups become bigger. A "du -sh" on the original /data drive shows a total usage of 2.0T&lt;/p&gt;&lt;p&gt;Any suggestions as to what might be happening here? Thanks, Marcel&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">marcel</dc:creator><pubDate>Thu, 16 Jan 2020 10:23:54 -0000</pubDate></item><item><title>Re: HTTP request debugging in Go with httputil</title><link>http://speakmy.name/2014/07/29/http-request-debugging-in-go/#comment-4451191142</link><description>&lt;p&gt;it relevant.  the above image was of log file which converts string to json because of jsonformatter&lt;/p&gt;&lt;p&gt;check the following  code&lt;br&gt;       dump, err := httputil.DumpRequest(r, true)&lt;br&gt;	if err != nil {&lt;br&gt;		http.Error(w, fmt.Sprint(err), http.StatusInternalServerError)&lt;br&gt;		return&lt;br&gt;	}&lt;br&gt;	logBody := fmt.Sprintf("%q", dump)&lt;br&gt;	fmt.Println(logBody)&lt;/p&gt;&lt;p&gt;when i print logBody to console  it give me output as a string not as a json&lt;/p&gt;&lt;p&gt;how to remove this image content from string&lt;br&gt; &lt;a href="https://uploads.disquscdn.com/images/54195a6aafe3f4245d2f99895be00da38abce3c00d19c92a6197811df6be4447.png" rel="nofollow noopener" target="_blank" title="https://uploads.disquscdn.com/images/54195a6aafe3f4245d2f99895be00da38abce3c00d19c92a6197811df6be4447.png"&gt;https://uploads.disquscdn.c...&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">sonu</dc:creator><pubDate>Mon, 06 May 2019 01:57:38 -0000</pubDate></item><item><title>Re: HTTP request debugging in Go with httputil</title><link>http://speakmy.name/2014/07/29/http-request-debugging-in-go/#comment-4451175631</link><description>&lt;p&gt;so, this doesn't look relevant to the actual post on this page then, does it? :)&lt;/p&gt;&lt;p&gt;But anyway, if this is a line from your log file - you have two levels of encoding here.&lt;/p&gt;&lt;p&gt;1. JSON container - a JSON object with level and msg keys. Unwrap this first using json.Unmarshal or json.NewDecoder, and get msg value.&lt;br&gt;2. With msg available (which is, from the looks of it, HTTP request), depending on your needs - you can just cut out the unneeded parts using string substitutions, or parse it with http.ReadRequest ( &lt;a href="https://golang.org/pkg/net/http/#ReadRequest" rel="nofollow noopener" target="_blank" title="https://golang.org/pkg/net/http/#ReadRequest"&gt;https://golang.org/pkg/net/...&lt;/a&gt; ), and manipulate the resulting http.Request object as you need.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">morhekil</dc:creator><pubDate>Mon, 06 May 2019 01:25:41 -0000</pubDate></item><item><title>Re: HTTP request debugging in Go with httputil</title><link>http://speakmy.name/2014/07/29/http-request-debugging-in-go/#comment-4450905711</link><description>&lt;p&gt;json.Unmarshal ( &lt;a href="https://golang.org/pkg/encoding/json/#Unmarshal" rel="nofollow noopener" target="_blank" title="https://golang.org/pkg/encoding/json/#Unmarshal"&gt;https://golang.org/pkg/enco...&lt;/a&gt; ) takes a byte array as its input, and allows you to parse it as a json string into a structure you give it - you can take a look at the example there see to how to it can be used.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">morhekil</dc:creator><pubDate>Sun, 05 May 2019 19:12:13 -0000</pubDate></item><item><title>Re: HTTP request debugging in Go with httputil</title><link>http://speakmy.name/2014/07/29/http-request-debugging-in-go/#comment-4450270103</link><description>&lt;p&gt;can you show an example of your input data and desired output?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">morhekil</dc:creator><pubDate>Sun, 05 May 2019 09:12:26 -0000</pubDate></item><item><title>Re: Modifying an interface{}-ed struct in Go via reflection</title><link>http://speakmy.name/2014/09/14/modifying-interfaced-go-struct/#comment-3904367662</link><description>&lt;p&gt;Thanks for the concise and very useful explanation!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Calvin Cliff</dc:creator><pubDate>Wed, 16 May 2018 23:40:02 -0000</pubDate></item><item><title>Re: Modifying an interface{}-ed struct in Go via reflection</title><link>http://speakmy.name/2014/09/14/modifying-interfaced-go-struct/#comment-3641768405</link><description>&lt;p&gt;Many thanks for the useful article 👍&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Alex Arno</dc:creator><pubDate>Fri, 01 Dec 2017 12:20:09 -0000</pubDate></item><item><title>Re: Automatic system backups with backup gem and some shell scripting - part 2, using backup gem</title><link>http://speakmy.name/2013/05/20/automatic-backups-with-ruby-and-linux-shell-part-2/#comment-3527260295</link><description>&lt;p&gt;Hi Ornago,&lt;/p&gt;&lt;p&gt;you can use sudoers file to give specific user or group access to run certain commands via sudo without the password. DigitalOcean has a good comprehensive tutorial on how to do it, so this might be a good starting point:&lt;/p&gt;&lt;p&gt;&lt;a href="https://www.digitalocean.com/community/tutorials/how-to-edit-the-sudoers-file-on-ubuntu-and-centos" rel="nofollow noopener" target="_blank" title="https://www.digitalocean.com/community/tutorials/how-to-edit-the-sudoers-file-on-ubuntu-and-centos"&gt;https://www.digitalocean.co...&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">morhekil</dc:creator><pubDate>Wed, 20 Sep 2017 20:21:16 -0000</pubDate></item><item><title>Re: Automatic system backups with backup gem and some shell scripting - part 2, using backup gem</title><link>http://speakmy.name/2013/05/20/automatic-backups-with-ruby-and-linux-shell-part-2/#comment-3526905133</link><description>&lt;p&gt;nice tutorial but my backup with "archive.use_sudo" is warning. "sudo: a password is required" how to do that? how can i give the backup gem sudo permissions w/o a password?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Ornago</dc:creator><pubDate>Wed, 20 Sep 2017 16:08:30 -0000</pubDate></item><item><title>Re: HTTP request debugging in Go with httputil</title><link>http://speakmy.name/2014/07/29/http-request-debugging-in-go/#comment-3473761219</link><description>&lt;p&gt;that's awesome, I'm glad it has helped you!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">morhekil</dc:creator><pubDate>Thu, 17 Aug 2017 20:31:22 -0000</pubDate></item><item><title>Re: HTTP request debugging in Go with httputil</title><link>http://speakmy.name/2014/07/29/http-request-debugging-in-go/#comment-3472596295</link><description>&lt;p&gt;It helps even after 3 years. Thank you!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Erl</dc:creator><pubDate>Thu, 17 Aug 2017 08:53:51 -0000</pubDate></item><item><title>Re: Modifying an interface{}-ed struct in Go via reflection</title><link>http://speakmy.name/2014/09/14/modifying-interfaced-go-struct/#comment-3287113059</link><description>&lt;p&gt;Thanks for the nice blog post :)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Myles</dc:creator><pubDate>Wed, 03 May 2017 14:17:48 -0000</pubDate></item><item><title>Re: Simple configuration for Ruby applications</title><link>http://speakmy.name/2011/05/29/simple-configuration-for-ruby-apps/#comment-1737341000</link><description>&lt;p&gt;thank you, nice solution, as I can see it works very well, except for values like no or false, because of the || in method_missing, solved with&lt;/p&gt;&lt;p&gt;@_settings[name.to_sym].nil?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Giulio</dc:creator><pubDate>Thu, 11 Dec 2014 14:31:33 -0000</pubDate></item><item><title>Re: GZipped JSON files and Logstash</title><link>http://speakmy.name/2014/01/13/gzipped-json-files-and-logstash/#comment-1690242229</link><description>&lt;p&gt;Hi Domen,&lt;/p&gt;&lt;p&gt;I'm glad that you found it interested. In its current form this codec expects quite constrained format of incoming data - i.e. names of the files available on the storage, so it won't generalise that well to the case of data being streamed over the wire.&lt;/p&gt;&lt;p&gt;That being said, it should be fairly easy to modify it to work with a stream of data instead - feel free to get in touch if you need any help with this.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">morhekil</dc:creator><pubDate>Wed, 12 Nov 2014 16:18:17 -0000</pubDate></item><item><title>Re: GZipped JSON files and Logstash</title><link>http://speakmy.name/2014/01/13/gzipped-json-files-and-logstash/#comment-1689656047</link><description>&lt;p&gt;This would be extremely useful to have upstream in logstash. UDP has a max data length limit and compressing messages when hitting that limit would help remove the constraint.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Domen Kožar</dc:creator><pubDate>Wed, 12 Nov 2014 10:38:00 -0000</pubDate></item><item><title>Re: GZipped JSON files and Logstash</title><link>http://speakmy.name/2014/01/13/gzipped-json-files-and-logstash/#comment-1344308171</link><description>&lt;p&gt;I can see two possible approaches to this.&lt;/p&gt;&lt;p&gt;First option - you set up another daemon to monitor send file events to redis (could be even a simple bash script, if you don't have too many files), and then the codec setup described in the post will pop them out of the queue and process as usual.&lt;/p&gt;&lt;p&gt;Second option - instead of using redis input, you can write your own input that will monitor the filesystem and send files to processing, as they appear. Current file-based input in logstash (&lt;a href="https://github.com/elasticsearch/logstash/blob/master/lib/logstash/inputs/file.rb" rel="nofollow noopener" target="_blank" title="https://github.com/elasticsearch/logstash/blob/master/lib/logstash/inputs/file.rb"&gt;source on github&lt;/a&gt;) is using &lt;a href="https://github.com/jordansissel/ruby-filewatch" rel="nofollow noopener" target="_blank" title="https://github.com/jordansissel/ruby-filewatch"&gt;FileWatch gem&lt;/a&gt; - you can use that as an example, and write your own input that is only watching for new files, and processes them.&lt;/p&gt;&lt;p&gt;Be careful with FileWatch, though - as far as I can see (based on a cursory reading of its source code), it is just listing files every time it is doing a discovery. If you have a non-trivial number of files (e.g. tens of thousands and up), it will be a slow process, and you'll be much better off ditching it and using kernel events to monitor directory changes - there're gems for that, too.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">morhekil</dc:creator><pubDate>Thu, 17 Apr 2014 23:45:56 -0000</pubDate></item><item><title>Re: GZipped JSON files and Logstash</title><link>http://speakmy.name/2014/01/13/gzipped-json-files-and-logstash/#comment-1343162873</link><description>&lt;p&gt;How would you set this up to pull the name of new .gz files as they are saved to a folder instead of having to enter them manually through the redis cli?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">logstashstudent</dc:creator><pubDate>Thu, 17 Apr 2014 13:49:22 -0000</pubDate></item><item><title>Re: Automatic system backups with backup gem and some shell scripting - part 1, the preparation</title><link>http://speakmy.name/2013/05/13/automatic-backups-with-ruby-and-linux-shell-part-1/#comment-1307918583</link><description>&lt;p&gt;oh, totally forgot to link it in the post - here it is, enjoy: &lt;a href="http://speakmy.name/2014/01/12/automatic-backups-with-ruby-and-linux-shell-part-3/" rel="nofollow noopener" target="_blank" title="http://speakmy.name/2014/01/12/automatic-backups-with-ruby-and-linux-shell-part-3/"&gt;http://speakmy.name/2014/01...&lt;/a&gt;&lt;/p&gt;&lt;p&gt;And fixed the post, thanks for the heads up.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">morhekil</dc:creator><pubDate>Fri, 28 Mar 2014 06:19:57 -0000</pubDate></item><item><title>Re: GZipped JSON files and Logstash</title><link>http://speakmy.name/2014/01/13/gzipped-json-files-and-logstash/#comment-1304416508</link><description>&lt;p&gt;awesome post&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">databoy</dc:creator><pubDate>Wed, 26 Mar 2014 17:56:19 -0000</pubDate></item><item><title>Re: Long-running MySQL queries may bring you down in sudden ways</title><link>http://speakmy.name/2008/11/long-running-mysql-queries-may-bring-you-down/#comment-844601442</link><description>&lt;p&gt;Nice read!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">SPun2U</dc:creator><pubDate>Thu, 28 Mar 2013 00:37:25 -0000</pubDate></item><item><title>Re: Simple configuration for Ruby applications</title><link>http://speakmy.name/2011/05/29/simple-configuration-for-ruby-apps/#comment-647642819</link><description>&lt;p&gt; Thanks, still having trouble with this. Have created the following Gist&lt;br&gt;&lt;a href="git://gist.github.com/3706025.git" rel="nofollow noopener" target="_blank" title="git://gist.github.com/3706025.git"&gt;git://gist.github.com/37060...&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Sorry, I'm still new with working with modules and mixins&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Rails Newbie</dc:creator><pubDate>Wed, 12 Sep 2012 07:22:40 -0000</pubDate></item></channel></rss>