<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3900221411649047443</id><updated>2024-02-20T03:46:59.551-05:00</updated><category term="Rails"/><category term="Deadlines"/><category term="Gem"/><category term="Google Plus"/><category term="Google+"/><category term="ImageMagick"/><category term="Options"/><category term="Paperclip"/><category term="Postfix"/><category term="Resize"/><category term="SHMMAX"/><category term="Send Emails"/><category term="Social Media"/><category term="install postgres"/><category term="postgres"/><category term="postgresql"/><title type='text'>Brayan Castro</title><subtitle type='html'>Personal Blog. Social Media, Ruby on Rails, Web development and more.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://brayancastrop.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3900221411649047443/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://brayancastrop.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Brayan</name><uri>http://www.blogger.com/profile/07677503860768465717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='21' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKxiGqyjzTWfq08ilIg0tfHIkxfiW25_24WU9OY86MJ-exHC54D8cHQ2SYTXCy8DfXIRFF0ZgiXyKl_EbIRyPDwIX7s8UCxVfuVtC0Gpr-XjxpDXgFX7iPCycSXbMK/s220/cover.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>5</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3900221411649047443.post-1324646730719161376</id><published>2011-12-01T15:01:00.001-05:00</published><updated>2011-12-01T15:12:06.538-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Deadlines"/><title type='text'>Deadlines</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&#39;allowfullscreen&#39; webkitallowfullscreen=&#39;webkitallowfullscreen&#39; mozallowfullscreen=&#39;mozallowfullscreen&#39; width=&#39;320&#39; height=&#39;266&#39; src=&#39;https://www.youtube.com/embed/jgvx9OfZKJw?feature=player_embedded&#39; frameborder=&#39;0&#39;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;br /&gt;
The best ideas needs time!!!</content><link rel='replies' type='application/atom+xml' href='http://brayancastrop.blogspot.com/feeds/1324646730719161376/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://brayancastrop.blogspot.com/2011/12/deadlines.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3900221411649047443/posts/default/1324646730719161376'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3900221411649047443/posts/default/1324646730719161376'/><link rel='alternate' type='text/html' href='http://brayancastrop.blogspot.com/2011/12/deadlines.html' title='Deadlines'/><author><name>Brayan</name><uri>http://www.blogger.com/profile/07677503860768465717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='21' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKxiGqyjzTWfq08ilIg0tfHIkxfiW25_24WU9OY86MJ-exHC54D8cHQ2SYTXCy8DfXIRFF0ZgiXyKl_EbIRyPDwIX7s8UCxVfuVtC0Gpr-XjxpDXgFX7iPCycSXbMK/s220/cover.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3900221411649047443.post-2149105169368784170</id><published>2011-11-17T17:44:00.000-05:00</published><updated>2011-11-17T17:44:26.533-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="install postgres"/><category scheme="http://www.blogger.com/atom/ns#" term="postgres"/><category scheme="http://www.blogger.com/atom/ns#" term="postgresql"/><category scheme="http://www.blogger.com/atom/ns#" term="SHMMAX"/><title type='text'>Setting kernel&#39;s SHMMAX and SHMALL parameters (Installing Postgresql)</title><content type='html'>Between the common issues that the developers ought pass is the correct installation of the database, worth noting that some databases are easier than others, but in this case i&#39;ll talk about a particular issue of postgres.&lt;br /&gt;
&lt;br /&gt;
Usually when we will start our postgres server, we use the follow command&lt;br /&gt;
&lt;br /&gt;
pg_ctl start -D /installation_directory&lt;br /&gt;
&lt;br /&gt;
the installation directory, outgth to have a file called postgresql.conf&lt;br /&gt;
&lt;br /&gt;
if your system is not configured with acceptable parameters to SHMMAX and SHMALL the before command will display an error like this:&lt;br /&gt;
&lt;br /&gt;
FATAL:  could not create shared memory segment: Invalid argument&lt;br /&gt;
DETAIL:  Failed system call was shmget(key=5432001, size=16498688, 03600).&lt;br /&gt;
HINT:  This error usually means that PostgreSQL&#39;s request for a shared memory segment exceeded your kernel&#39;s SHMMAX parameter.  You can either reduce the request size or reconfigure the kernel with larger SHMMAX.  To reduce the request size (currently 16498688 bytes), reduce PostgreSQL&#39;s shared_buffers parameter (currently 1536) and/or its max_connections parameter (currently 104).&lt;br /&gt;
If the request size is already small, it&#39;s possible that it is less than your kernel&#39;s SHMMIN parameter, in which case raising the request size or reconfiguring SHMMIN is called for.&lt;br /&gt;
The PostgreSQL documentation contains more information about shared memory configuration.&lt;br /&gt;
&lt;br /&gt;
in order to fix this, we have to configure these parameters correctly, to do this we have to execute the following commands.&lt;br /&gt;
&lt;br /&gt;
Brayans-MacBook:~ brayancastrop$ sudo sysctl -w kern.sysv.shmmax=1073741824&lt;br /&gt;
kern.sysv.shmmax: 4194304 -&amp;gt; 1073741824&lt;br /&gt;
Brayans-MacBook:~ brayancastrop$ sudo sysctl -w kern.sysv.shmall=1073741824&lt;br /&gt;
kern.sysv.shmall: 1024 -&amp;gt; 1073741824&lt;br /&gt;
&lt;br /&gt;
And that is it. now start your server&lt;br /&gt;
&lt;br /&gt;
pg_ctl start -D /installation_directory&lt;br /&gt;
&lt;br /&gt;
And go ahead!!!</content><link rel='replies' type='application/atom+xml' href='http://brayancastrop.blogspot.com/feeds/2149105169368784170/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://brayancastrop.blogspot.com/2011/11/setting-kernels-shmmax-and-shmall.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3900221411649047443/posts/default/2149105169368784170'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3900221411649047443/posts/default/2149105169368784170'/><link rel='alternate' type='text/html' href='http://brayancastrop.blogspot.com/2011/11/setting-kernels-shmmax-and-shmall.html' title='Setting kernel&#39;s SHMMAX and SHMALL parameters (Installing Postgresql)'/><author><name>Brayan</name><uri>http://www.blogger.com/profile/07677503860768465717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='21' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKxiGqyjzTWfq08ilIg0tfHIkxfiW25_24WU9OY86MJ-exHC54D8cHQ2SYTXCy8DfXIRFF0ZgiXyKl_EbIRyPDwIX7s8UCxVfuVtC0Gpr-XjxpDXgFX7iPCycSXbMK/s220/cover.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3900221411649047443.post-1079861712416288716</id><published>2011-11-09T11:49:00.000-05:00</published><updated>2011-11-09T11:49:54.205-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Postfix"/><category scheme="http://www.blogger.com/atom/ns#" term="Rails"/><category scheme="http://www.blogger.com/atom/ns#" term="Send Emails"/><title type='text'>Sending emails from local machine with Rails and Mac</title><content type='html'>From a long time ago I&#39;ve ever had this problem, we can do this configuring our application file using smtp services like example &quot;google&quot;, but it&#39;s really pretty easy.&lt;br /&gt;
&lt;br /&gt;
To do this we only need follow two simple steps...&lt;br /&gt;
&lt;br /&gt;
1. Configure your development enviroment file to use as delivery method :sendmail as follow&lt;br /&gt;
&lt;br /&gt;
  config.action_mailer.delivery_method = :sendmail&lt;br /&gt;
&lt;br /&gt;
2. Start your smtp server that is already installed with Mac OSX Leopard or Lion in a console as follow&lt;br /&gt;
&lt;br /&gt;
  sudo postfix start&lt;br /&gt;
&lt;br /&gt;
  note: to see the log run &quot;sudo tail -f /var/log/mail.log&quot;&lt;br /&gt;
&lt;br /&gt;
Too Easy!!!</content><link rel='replies' type='application/atom+xml' href='http://brayancastrop.blogspot.com/feeds/1079861712416288716/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://brayancastrop.blogspot.com/2011/11/sending-emails-from-local-machine-with.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3900221411649047443/posts/default/1079861712416288716'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3900221411649047443/posts/default/1079861712416288716'/><link rel='alternate' type='text/html' href='http://brayancastrop.blogspot.com/2011/11/sending-emails-from-local-machine-with.html' title='Sending emails from local machine with Rails and Mac'/><author><name>Brayan</name><uri>http://www.blogger.com/profile/07677503860768465717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='21' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKxiGqyjzTWfq08ilIg0tfHIkxfiW25_24WU9OY86MJ-exHC54D8cHQ2SYTXCy8DfXIRFF0ZgiXyKl_EbIRyPDwIX7s8UCxVfuVtC0Gpr-XjxpDXgFX7iPCycSXbMK/s220/cover.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3900221411649047443.post-9025631370026220909</id><published>2011-08-12T23:39:00.000-05:00</published><updated>2011-11-17T17:58:46.356-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Gem"/><category scheme="http://www.blogger.com/atom/ns#" term="ImageMagick"/><category scheme="http://www.blogger.com/atom/ns#" term="Options"/><category scheme="http://www.blogger.com/atom/ns#" term="Paperclip"/><category scheme="http://www.blogger.com/atom/ns#" term="Rails"/><category scheme="http://www.blogger.com/atom/ns#" term="Resize"/><title type='text'>Paperclip Resizing Options</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;
Paperclip is intended as an easy file attachment library for ActiveRecord. The intent behind it was to keep setup as easy as possible and to treat files as much like other attributes as possible. This means they aren&#39;t saved to their final locations on disk, nor are they deleted if set to nil, until ActiveRecord::Base#save is called. It manages validations based on size and presence, if required. It can transform its assigned image into thumbnails if needed, and the prerequisites are as simple as installing ImageMagick (which, for most modern Unix-based systems, is as easy as installing the right packages). Attached files are saved to the filesystem and referenced in the browser by an easily understandable specification, which has sensible and useful defaults.&lt;/div&gt;
You can see the Github Repository through the link below&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://github.com/thoughtbot/paperclip&quot;&gt;Paperclip GitHub Page&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Resizing Options&lt;br /&gt;
&lt;br /&gt;
The link below give us a lot of technical info about the options for resizing through ImageMagick&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.imagemagick.org/Usage/resize&quot;&gt;Complete list of ImageMagick options&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
But how can we use this options through Paperclip?&lt;br /&gt;
&lt;br /&gt;
Paperclip has a wiki page giving us a few examples about how-to use it &lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://github.com/thoughtbot/paperclip/wiki/Thumbnail-Generation&quot;&gt;https://github.com/thoughtbot/paperclip/wiki/Thumbnail-Generation&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
Having a user model with an atached photo with some thumbnails (thumb, small, medium and others); I can resize it&#39;s dimensions using flags like &quot;#&quot;, &quot;&amp;gt;&quot; or &quot;^&quot; and others&lt;br /&gt;
&lt;br /&gt;
But how can we apply this to our styles?&lt;br /&gt;
&lt;br /&gt;
We can use this for:&lt;br /&gt;
&lt;br /&gt;
- fixed width and/or height&lt;br /&gt;
&lt;br /&gt;
It can be used like below:&lt;br /&gt;
...&lt;br /&gt;
has_attached_file :photo,&lt;br /&gt;
&amp;nbsp; :styles =&amp;gt; {&lt;br /&gt;
&amp;nbsp; :tiny =&amp;gt; &quot;100x100&quot;, &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;# fixed width and height&lt;br /&gt;
&amp;nbsp; :thumb =&amp;gt; &quot;100&amp;gt;x100&quot;,     # resize to a fixed width if original height&amp;nbsp;if greather than specified&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;# dimension and&amp;nbsp;fixed height&lt;br /&gt;
&amp;nbsp; :small =&amp;gt; &quot;200x200&amp;gt;&quot;, &amp;nbsp; # fixed width and resize to a fixed height&amp;nbsp;if original height i greather than&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;# specified dimension&lt;br /&gt;
&amp;nbsp; :medium =&amp;gt; &quot;200&lt;x200&quot;, #=&quot;&quot; :large=&quot;&quot; a=&quot;&quot; and=&quot;&quot; dimension=&quot;&quot; fixed=&quot;&quot; height=&quot;&quot; i=&quot;&quot; if=&quot;&quot; less=&quot;&quot; original=&quot;&quot; resize=&quot;&quot; specified=&quot;&quot; than=&quot;&quot; to=&quot;&quot; width=&quot;&quot;&gt; &quot;200x200&amp;lt;&quot;      # fixed width and resize to a fixed heigth&amp;nbsp;&lt;/x200&quot;,&gt;if original height i less&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # than specified dimension&lt;br /&gt;
}&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
- fixed width and/or proportional height

It can be used like below:&lt;br /&gt;
...&lt;br /&gt;
has_attached_file :photo,
  :styles =&amp;gt; {&lt;br /&gt;
&lt;x200&quot;, #=&quot;&quot; :large=&quot;&quot; a=&quot;&quot; and=&quot;&quot; dimension=&quot;&quot; fixed=&quot;&quot; height=&quot;&quot; i=&quot;&quot; if=&quot;&quot; less=&quot;&quot; original=&quot;&quot; resize=&quot;&quot; specified=&quot;&quot; than=&quot;&quot; to=&quot;&quot; width=&quot;&quot;&gt;&amp;nbsp; :small =&amp;gt; &quot;100&quot;, &amp;nbsp; &amp;nbsp; &amp;nbsp; # fixed width and proportional height&lt;br /&gt;&amp;nbsp; :medium =&amp;gt; &quot;x100&quot;        # proportional width and fixed height&lt;br /&gt;
}&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
For more details about the geometry argument (&quot;widthxheigth - 100x100&quot;) and these options see the link below&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.blogger.com/goog_1117794300&quot;&gt;h&lt;/a&gt;&lt;a href=&quot;ttp://www.imagemagick.org/script/command-line-processing.php#geometry&quot;&gt;ttp://www.imagemagick.org/script/command-line-processing.php#geometry&lt;/a&gt;&lt;/x200&quot;,&gt;</content><link rel='replies' type='application/atom+xml' href='http://brayancastrop.blogspot.com/feeds/9025631370026220909/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://brayancastrop.blogspot.com/2011/08/paperclip-resizing-options.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3900221411649047443/posts/default/9025631370026220909'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3900221411649047443/posts/default/9025631370026220909'/><link rel='alternate' type='text/html' href='http://brayancastrop.blogspot.com/2011/08/paperclip-resizing-options.html' title='Paperclip Resizing Options'/><author><name>Brayan</name><uri>http://www.blogger.com/profile/07677503860768465717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='21' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKxiGqyjzTWfq08ilIg0tfHIkxfiW25_24WU9OY86MJ-exHC54D8cHQ2SYTXCy8DfXIRFF0ZgiXyKl_EbIRyPDwIX7s8UCxVfuVtC0Gpr-XjxpDXgFX7iPCycSXbMK/s220/cover.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3900221411649047443.post-5133039549022262188</id><published>2011-07-09T15:28:00.000-05:00</published><updated>2011-07-09T15:28:20.402-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Google Plus"/><category scheme="http://www.blogger.com/atom/ns#" term="Google+"/><category scheme="http://www.blogger.com/atom/ns#" term="Social Media"/><title type='text'>Social Media and Google+</title><content type='html'>Now Google give us a new way to promote your web apps in the Social Media World through the plus button.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.google.com/webmasters/+1/button/&quot;&gt;Google+ Button&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://brayancastrop.blogspot.com/feeds/5133039549022262188/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://brayancastrop.blogspot.com/2011/07/social-media-and-google.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3900221411649047443/posts/default/5133039549022262188'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3900221411649047443/posts/default/5133039549022262188'/><link rel='alternate' type='text/html' href='http://brayancastrop.blogspot.com/2011/07/social-media-and-google.html' title='Social Media and Google+'/><author><name>Brayan</name><uri>http://www.blogger.com/profile/07677503860768465717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='21' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKxiGqyjzTWfq08ilIg0tfHIkxfiW25_24WU9OY86MJ-exHC54D8cHQ2SYTXCy8DfXIRFF0ZgiXyKl_EbIRyPDwIX7s8UCxVfuVtC0Gpr-XjxpDXgFX7iPCycSXbMK/s220/cover.jpg'/></author><thr:total>0</thr:total></entry></feed>