<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Jerzy's Notes</title><link>http://notes.jerzygangi.com/</link><description>Recent content on Jerzy's Notes</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><lastBuildDate>Sun, 29 May 2016 00:00:00 +0000</lastBuildDate><atom:link href="http://notes.jerzygangi.com/index.xml" rel="self" type="application/rss+xml"/><item><title>echo on Linux does not need quotes</title><link>http://notes.jerzygangi.com/echo-on-linux-does-not-need-quotes/</link><pubDate>Sun, 29 May 2016 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/echo-on-linux-does-not-need-quotes/</guid><description>The echo command in Linux does not require quotes:
echo Hi there blog readers &amp;hellip;will output the same as:
echo &amp;#34;Hi there blog readers&amp;#34; The obvious exception is when the string to be printed contains special characters that would confuse echo itself, in which case quotations may be necessary.</description></item><item><title>How I use ls on Linux</title><link>http://notes.jerzygangi.com/how-i-use-ls-linux/</link><pubDate>Sat, 28 May 2016 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/how-i-use-ls-linux/</guid><description>When I run ls, I run it as ls -lAhog:
l says to put each file or folder on its own line A says to list all files &amp;ndash; hidden files, backups, etc. &amp;ndash; but omit the current directory (.) and the parent directory (..) h says to use human readable file sizes &amp;ndash; 1.5G instead of 1628688384 g says to omit the user o says to omit the group Occasionally I use the -R parameter, which lists folders and subfolders recursively.</description></item><item><title>How to rename a hash key in Ruby</title><link>http://notes.jerzygangi.com/how-to-rename-hash-key-ruby/</link><pubDate>Sat, 28 May 2016 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/how-to-rename-hash-key-ruby/</guid><description>Assume you have a Ruby Hash with the regions of the United States:
$ usa_regions =&amp;gt; {&amp;#34;northeast&amp;#34;=&amp;gt;11, &amp;#34;southeast&amp;#34;=&amp;gt;12, &amp;#34;midwest&amp;#34;=&amp;gt;12, &amp;#34;southwest&amp;#34;=&amp;gt;4, &amp;#34;rest&amp;#34;=&amp;gt;9} But instead of calling the West the rest, you want to rename it to west.
Here&amp;rsquo;s how you would do that:
$ usa_regions[&amp;#34;west&amp;#34;] = usa_regions.delete(&amp;#34;rest&amp;#34;) Now, usa_regions has a hash key named west instead of rest. Importantly, the value of rest &amp;ndash; 9 &amp;ndash; has been preserved and assigned to west:</description></item><item><title>How to change the root password on MySQL</title><link>http://notes.jerzygangi.com/how-to-change-the-root-password-on-mysql/</link><pubDate>Mon, 01 Feb 2016 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/how-to-change-the-root-password-on-mysql/</guid><description>Sometimes the simplest sysadmin tasks are the hardest to find straightforward answers to. Recently, I spent too much time trying to change the root password on a fresh mysql install.
Changing the root password for MySQL has security implications; there is no shortage of paranoid nerds describing how the world might end if you do what I&amp;rsquo;m about to do. If you understand the security implications of setting the root MySQL password, and still want to do it anyway, here&amp;rsquo;s how:</description></item><item><title>Location of the systemwide crontab on CentOS</title><link>http://notes.jerzygangi.com/location-of-systemwide-crontab-on-centos/</link><pubDate>Sun, 31 Jan 2016 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/location-of-systemwide-crontab-on-centos/</guid><description>The systemwide crontab file on CentOS can be found at
/etc/crontab You can edit it with your editor of choice, e.g.
sudo vi /etc/crontab</description></item><item><title>"No distributions at all found for..." &amp; "Could not find any downloads that satisfy the requirement..." errors in Pip and PyPI</title><link>http://notes.jerzygangi.com/no-distributions-at-all-found-for-python-pip-pypi/</link><pubDate>Thu, 28 Jan 2016 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/no-distributions-at-all-found-for-python-pip-pypi/</guid><description>&lt;p>Recently, my team members starting seeing intermittent install errors from &lt;code>pip&lt;/code>. Python packages that had installed days, hours, or even minutes ago suddenly became unavailable when &lt;code>pip install&lt;/code> was run.&lt;/p></description></item><item><title>The Case for ToolsOps</title><link>http://notes.jerzygangi.com/the-case-for-tools-ops/</link><pubDate>Sat, 05 Dec 2015 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/the-case-for-tools-ops/</guid><description>&lt;p>Today, an overwhelming amount of software tools are available for developers. There&amp;rsquo;s &lt;strong>data stores&lt;/strong> and &lt;strong>Javascript frameworks&lt;/strong> and &lt;strong>compilers&lt;/strong> and &lt;strong>IDE&amp;rsquo;s&lt;/strong> and &lt;strong>CI servers&lt;/strong> and &lt;strong>browser extensions&lt;/strong> and &lt;strong>virtualization suites&lt;/strong> and &lt;strong>deployment tools&lt;/strong> and &lt;strong>ETL toolkits&lt;/strong> and &lt;strong>ORM&amp;rsquo;s&lt;/strong> and &lt;strong>configuration managers&lt;/strong> and &lt;strong>minifiers&lt;/strong> and &lt;strong>CSS frameworks&lt;/strong>. And that&amp;rsquo;s only scratching the surface. And the list is growing fast.&lt;/p></description></item><item><title>Location of Wordpress' php.ini file in Ubuntu</title><link>http://notes.jerzygangi.com/location-of-wordpress-php-ini-file-in-ubuntu/</link><pubDate>Fri, 09 Jan 2015 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/location-of-wordpress-php-ini-file-in-ubuntu/</guid><description>/etc/php5/apache2/php.ini</description></item><item><title>How to use mdfind to search for every file on OS X</title><link>http://notes.jerzygangi.com/how-to-use-mdfind-to-search-for-every-file-on-os-x/</link><pubDate>Tue, 06 Jan 2015 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/how-to-use-mdfind-to-search-for-every-file-on-os-x/</guid><description>Spotlight is great, but it has some mom-friendly rules that limit the results. Since I&amp;rsquo;m a power user, I typically want to search the entire computer and see all results. Therefore, I use the mdfind command to search OS X.
Just pop open Terminal and type:
mdfind &amp;#34;income tax&amp;#34; This will search for all files with the metadata words &amp;ldquo;income tax.&amp;rdquo;</description></item><item><title>How to get and set model data from inside a Rails model</title><link>http://notes.jerzygangi.com/how-to-get-and-set-model-data-from-inside-a-rails-model/</link><pubDate>Mon, 05 Jan 2015 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/how-to-get-and-set-model-data-from-inside-a-rails-model/</guid><description>How to get the my_var model variable:
puts self.var or
puts var How to set the my_var model variable:
self.var = &amp;#34;new value&amp;#34; Note that when setting, you must prefix with self., unlike when getting. Also note that @var will not work for setting or getting model data, ever.</description></item><item><title>How to list all MySQL databases on a server</title><link>http://notes.jerzygangi.com/how-to-list-all-mysql-databases-on-a-server/</link><pubDate>Mon, 05 Jan 2015 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/how-to-list-all-mysql-databases-on-a-server/</guid><description>SHOWdatabases;</description></item><item><title>Solution to the "Coin Maker" computer science interview question, using Ruby</title><link>http://notes.jerzygangi.com/solution-to-the-coin-maker-computer-science-interview-question-using-ruby/</link><pubDate>Mon, 05 Jan 2015 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/solution-to-the-coin-maker-computer-science-interview-question-using-ruby/</guid><description>&lt;p>A common computer science interview question goes something like this:&lt;/p>
&lt;p>&amp;ldquo;Write a program that makes change with a minimum amount of coins for a given amount &amp;ndash; a &amp;lsquo;Coin Maker&amp;rsquo;, if you will. You have unlimited amount of 1¢, 5¢, 10¢, and 25¢ coins. For example, $2.16 would consist of 8 quarters, 1 dime, 1 nickle, and 1 penny: 11 total coins.&amp;rdquo;&lt;/p></description></item><item><title>It's okay to make non-RESTful controllers &amp; routes in Rails</title><link>http://notes.jerzygangi.com/it-is-okay-to-make-non-restful-controllers-and-routes-in-rails/</link><pubDate>Tue, 30 Dec 2014 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/it-is-okay-to-make-non-restful-controllers-and-routes-in-rails/</guid><description>&lt;p>As part of my ongoing professional education, I&amp;rsquo;ve decided to read through several Ruby on Rails projects on Github. It has been a great experience, and I am learning a lot. It&amp;rsquo;s insightful to see where I&amp;rsquo;m better than other software architects, and where I have room to grow &amp;ndash; there are some very nuanced lessons to learn, and some very simple ones. This is one of the very simple ones.&lt;/p></description></item><item><title>Vagrant cheat sheet</title><link>http://notes.jerzygangi.com/vagrant-cheat-sheet/</link><pubDate>Sun, 21 Dec 2014 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/vagrant-cheat-sheet/</guid><description>&lt;p>Developing robust software requires an accurate testing and staging environment. Vagrant provides just that. It lets you mimic your production server map on your computer.&lt;/p></description></item><item><title>:dependent => :destroy vs. :dependent => :delete_all in Rails models</title><link>http://notes.jerzygangi.com/dependent-destroy-vs-dependent-delete-all-in-rails-models/</link><pubDate>Sat, 20 Dec 2014 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/dependent-destroy-vs-dependent-delete-all-in-rails-models/</guid><description>If you use :dependent =&amp;gt; :destroy in your Rails model, each model to be destroyed will be instantiated and the destroy() method will be called upon it. This will result in the normal object destruction lifecycle, include any callbacks. Destroying children and grandchildren can be handled gracefully. It is a safe, normal way to destroy objects. If you&amp;rsquo;re not sure whether to use :dependent =&amp;gt; :destroy or :dependent =&amp;gt; :delete_all, use :dependent =&amp;gt; destroy.</description></item><item><title>Don't use t.integer for referencing related tables in Rails migrations</title><link>http://notes.jerzygangi.com/dont-use-integer-for-referencing-related-tables-in-rails-migrations/</link><pubDate>Sat, 20 Dec 2014 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/dont-use-integer-for-referencing-related-tables-in-rails-migrations/</guid><description>Instead, use:
create_table :address do |t| t.references :person end</description></item><item><title>Get a list of every Vagrant VM running on your computer</title><link>http://notes.jerzygangi.com/get-a-list-of-every-vagrant-vm-running-on-your-computer/</link><pubDate>Sat, 20 Dec 2014 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/get-a-list-of-every-vagrant-vm-running-on-your-computer/</guid><description>vagrant global-status</description></item><item><title>How to bind Vagrant to port 80 on OS X</title><link>http://notes.jerzygangi.com/how-to-bind-vagrant-to-port-80-on-os-x/</link><pubDate>Sat, 20 Dec 2014 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/how-to-bind-vagrant-to-port-80-on-os-x/</guid><description>First, stop Apache. Apache listens on port 80. If it&amp;rsquo;s running, Vagrant won&amp;rsquo;t be able to bind a VM to listen on port 80.
Then, just add a forwarded port to your Vagrantfile:
config.vm.network &amp;#34;forwarded_port&amp;#34;, guest: 80, host: 80 And boot up Vagrant as sudo:
sudo vagrant up</description></item><item><title>How to figure out which processes is listening on a port on OS X</title><link>http://notes.jerzygangi.com/how-to-figure-out-which-processes-is-listening-on-a-port-on-os-x/</link><pubDate>Sat, 20 Dec 2014 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/how-to-figure-out-which-processes-is-listening-on-a-port-on-os-x/</guid><description>sudo lsof -n -i4TCP:$PORT | grep LISTEN Replace $PORT with the port you are looking for This only works with TCP ports. Prefixing with sudo will show proceses the current user does not own</description></item><item><title>How to start and stop Apache in OS X</title><link>http://notes.jerzygangi.com/how-to-start-and-stop-apache-in-os-x/</link><pubDate>Sat, 20 Dec 2014 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/how-to-start-and-stop-apache-in-os-x/</guid><description>How to start Apache:
sudo apachectl start How to stop Apache:
sudo apachectl stop How to restart Apache:
sudo apachectl restart N.B. I am on OS X Mavericks. It ships with Apache 2.</description></item><item><title>Rails' link_to always gives me a headache</title><link>http://notes.jerzygangi.com/rails-link-to-always-gives-me-a-headache/</link><pubDate>Sat, 20 Dec 2014 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/rails-link-to-always-gives-me-a-headache/</guid><description>After 9 years of writing Ruby on Rails code, link_to() never ceases to trip me up. Does it trip you up, too? Here are some quick notes:
The first argument is what you want inside the &amp;lt;a&amp;gt; tag. For example link_to(&amp;quot;today's news&amp;quot;) produces &amp;lt;a&amp;gt;today's news&amp;lt;/a&amp;gt; The second argument is the href attribute value. For example, link_to(&amp;quot;today's news&amp;quot;, &amp;quot;www.news.com&amp;quot;) produces &amp;lt;a href=&amp;quot;www.news.com&amp;quot;&amp;gt;today's news&amp;lt;/a&amp;gt; The third argument is a hash that contains everything else &amp;ndash; most importantly, your &amp;lt;a&amp;gt; tag attributes.</description></item><item><title>View all valid URL routes in a Rails app</title><link>http://notes.jerzygangi.com/view-all-valid-url-routes-in-a-rails-app/</link><pubDate>Sat, 20 Dec 2014 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/view-all-valid-url-routes-in-a-rails-app/</guid><description>rake routes</description></item><item><title>What is the ./bin directory in a Ruby on Rails project?</title><link>http://notes.jerzygangi.com/what-is-the-bin-directory-in-a-ruby-on-rails-project/</link><pubDate>Sat, 20 Dec 2014 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/what-is-the-bin-directory-in-a-ruby-on-rails-project/</guid><description>&lt;p>Introduced in Rails 4, the &lt;code>./bin&lt;/code> directory contains your app&amp;rsquo;s &amp;ldquo;binstubs.&amp;rdquo; Binstubs are wrappers around gem executables, like &lt;code>rails&lt;/code> or &lt;code>bundle&lt;/code>, which ensures a gem executable is run inside the correct environment for your Rails app.&lt;/p></description></item><item><title>The Ruby on Rails folder structure</title><link>http://notes.jerzygangi.com/the-ruby-on-rails-folder-structure/</link><pubDate>Fri, 19 Dec 2014 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/the-ruby-on-rails-folder-structure/</guid><description>&lt;p>When a new Ruby on Rails project is created with &lt;code>rails new&lt;/code>, many files and folders are created inside your project folder. Here&amp;rsquo;s a quick reference of what those are.&lt;/p></description></item><item><title>How to assign a variable based on a condition in Ruby</title><link>http://notes.jerzygangi.com/how-to-assign-a-variable-based-on-a-condition-in-ruby/</link><pubDate>Thu, 18 Dec 2014 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/how-to-assign-a-variable-based-on-a-condition-in-ruby/</guid><description>&lt;p>If you need to assign a variable based on a conditional, most programmers would do something like this:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-ruby" data-lang="ruby">&lt;span class="line">&lt;span class="cl">&lt;span class="n">result&lt;/span> &lt;span class="o">=&lt;/span> &lt;span class="kp">nil&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="k">if&lt;/span> &lt;span class="n">condition&lt;/span> &lt;span class="o">==&lt;/span> &lt;span class="kp">true&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">result&lt;/span> &lt;span class="o">=&lt;/span> &lt;span class="mi">1&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="k">else&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">result&lt;/span> &lt;span class="o">=&lt;/span> &lt;span class="mi">2&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="k">end&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="nb">puts&lt;/span> &lt;span class="s2">&amp;#34;The result is {result}.&amp;#34;&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;p>I usually cringe when people say things like, &amp;ldquo;Oh, that&amp;rsquo;s a very C way of doing that&amp;rdquo;&amp;hellip; but in this case, well, that&amp;rsquo;s a very C way of doing that.&lt;/p></description></item><item><title>How to delete all rows in a MySQL or Oracle table</title><link>http://notes.jerzygangi.com/how-to-delete-all-rows-in-a-mysql-or-oracle-table/</link><pubDate>Thu, 18 Dec 2014 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/how-to-delete-all-rows-in-a-mysql-or-oracle-table/</guid><description>There are two methods:
DELETEFROMtable_name or
TRUNCATETABLEtable_name The latter is more efficient, because it does not reference each row before deleting; it is a bulk operation. The former is expanded into DELETE * FROM table_name, which works on one row at a time. Therefore, use the latter.</description></item><item><title>How to list all rake tasks</title><link>http://notes.jerzygangi.com/how-to-list-all-rake-tasks/</link><pubDate>Thu, 18 Dec 2014 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/how-to-list-all-rake-tasks/</guid><description>rake -T -A This command will print out all available rake tasks. You can use it with Rails&amp;rsquo; Rakefile, or with a custom Rakefile. N.B.: not all tasks have descriptions, and that is okay.</description></item><item><title>How to open the database's CLI in Ruby on Rails</title><link>http://notes.jerzygangi.com/how-to-open-the-databases-cli-in-ruby-on-rails/</link><pubDate>Thu, 18 Dec 2014 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/how-to-open-the-databases-cli-in-ruby-on-rails/</guid><description>rails dbconsole</description></item><item><title>Should I use MySQL or PostgreSQL with Ruby on Rails?</title><link>http://notes.jerzygangi.com/should-i-use-mysql-or-postgresql-with-ruby-on-rails/</link><pubDate>Thu, 18 Dec 2014 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/should-i-use-mysql-or-postgresql-with-ruby-on-rails/</guid><description>PostgreSQL.
(Updated for 2015.)</description></item><item><title>Bash cheat sheet</title><link>http://notes.jerzygangi.com/bash-cheat-sheet/</link><pubDate>Wed, 17 Dec 2014 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/bash-cheat-sheet/</guid><description>&lt;p>Technically, this is a &lt;code>bash&lt;/code> cheat sheet; however, many of the commands will work with Bourne shell descendants, such as &lt;code>zsh&lt;/code>.&lt;/p></description></item><item><title>The only way that actually works to clear the screen in tmux</title><link>http://notes.jerzygangi.com/the-only-way-that-actually-works-to-clear-the-screen-in-tmux/</link><pubDate>Tue, 16 Dec 2014 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/the-only-way-that-actually-works-to-clear-the-screen-in-tmux/</guid><description>It was like pulling teeth to figure out a way to clear the screen in tmux, such as CMD+K does in Terminal.app and iTerm. Add this line to your tmux.conf. It Just Works™:
bind -n C-k send-keys -R \; send-keys C-l \; clear-history</description></item><item><title>Using attr_accessor in Rails model classes</title><link>http://notes.jerzygangi.com/using-attr-accessor-in-rails-model-classes/</link><pubDate>Tue, 16 Dec 2014 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/using-attr-accessor-in-rails-model-classes/</guid><description>Don&amp;rsquo;t confuse attr_accessor and attr_accessible &amp;ndash; they have very similar names attr_accessor is a pure Ruby function to create reader and writer methods for an instance variable attr_accessible is a pre-Rails 4 function to list the model attributes (e.g., database fields) that can be set via mass assignment, providing access control You can use attr_accessor on a Rails model to create non-persisted instance variables. For example:
class Stock attr_accessor :current_price end This allows you to get the @current_price of a stock &amp;ndash; something that would make no sense to persist.</description></item><item><title>How to create a database in MySQL</title><link>http://notes.jerzygangi.com/how-to-create-a-database-in-mysql/</link><pubDate>Mon, 15 Dec 2014 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/how-to-create-a-database-in-mysql/</guid><description>CREATEDATABASEmy_db;</description></item><item><title>How to ensure multiple ActiveRecord calls happen sequentially</title><link>http://notes.jerzygangi.com/how-to-ensure-multiple-activerecord-calls-happen-sequentially/</link><pubDate>Mon, 15 Dec 2014 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/how-to-ensure-multiple-activerecord-calls-happen-sequentially/</guid><description>ActiveRecord::Base.transaction do savings.withdrawal(100) checking.deposit(100) end If any exceptions are raised, the entire operation is rolled back on the database layer and nothing will be committed to the database.</description></item><item><title>How to run Javascript code on Mac OS X</title><link>http://notes.jerzygangi.com/how-to-run-javascript-code-on-mac-os-x/</link><pubDate>Mon, 15 Dec 2014 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/how-to-run-javascript-code-on-mac-os-x/</guid><description>When developing Javascript, you may wish to run code outside the browser. Luckily OS X comes with a world-class Javascript engine, which features a command-line interpreter.
Since it&amp;rsquo;s hidden deep inside a framework, create a symbolic link: sudo ln -s /System/Library/Frameworks/JavaScriptCore.framework/Resources/jsc /usr/local/bin/js
Now, you can enter the interpreter by simply typing: js
The interpreter can be quit by typing quit(); or ctrl+c.</description></item><item><title>tmux cheat sheet</title><link>http://notes.jerzygangi.com/tmux-cheat-sheet/</link><pubDate>Mon, 15 Dec 2014 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/tmux-cheat-sheet/</guid><description>&lt;p>Since switching to &lt;code>vim&lt;/code>, I&amp;rsquo;ve found myself really enjoying keyboard-based user interfaces. So instead of managing multiple terminal sessions in iTerm, I have started using tmux. I&amp;rsquo;m writing this cheat sheet as I learn. Check back often.&lt;/p></description></item><item><title>Where is Finder.app located on OS X?</title><link>http://notes.jerzygangi.com/where-is-finder-app-located-on-os-x/</link><pubDate>Mon, 15 Dec 2014 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/where-is-finder-app-located-on-os-x/</guid><description>/System/Library/CoreServices/Finder.app</description></item><item><title>How to use sshkit in vanilla Ruby (without Rails)</title><link>http://notes.jerzygangi.com/how-to-use-sshkit-in-vanilla-ruby-without-rails/</link><pubDate>Mon, 08 Dec 2014 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/how-to-use-sshkit-in-vanilla-ruby-without-rails/</guid><description>require &amp;#39;rake&amp;#39; require &amp;#39;sshkit&amp;#39; require &amp;#39;sshkit/dsl&amp;#39; # your code goes here</description></item><item><title>How to start and stop MySQL on OS X</title><link>http://notes.jerzygangi.com/how-to-start-and-stop-mysql-on-os-x/</link><pubDate>Sat, 06 Dec 2014 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/how-to-start-and-stop-mysql-on-os-x/</guid><description>To start MySQL on OS X:
mysql.server start To stop MySQL on OS X:
mysql.server stop</description></item><item><title>How to sum in Excel when you have non-numeric fields</title><link>http://notes.jerzygangi.com/how-to-sum-in-excel-when-you-have-non-numeric-fields/</link><pubDate>Sat, 06 Dec 2014 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/how-to-sum-in-excel-when-you-have-non-numeric-fields/</guid><description>&lt;p>When building spreadsheets, I often &lt;code>SUM()&lt;/code> up large sets of numbers in Excel. However, a common problem arises when you want to write &lt;code>---&lt;/code> or &lt;code>N/A&lt;/code> to signify that a cell is intentionally empty. This causes &lt;code>SUM()&lt;/code> to error.&lt;/p></description></item><item><title>How to get a list of open files for a process</title><link>http://notes.jerzygangi.com/how-to-get-a-list-of-open-files-for-a-process/</link><pubDate>Wed, 19 Nov 2014 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/how-to-get-a-list-of-open-files-for-a-process/</guid><description>lsof -p PID_NUMBER</description></item><item><title>How to put a prompt before gets.chomp in Ruby</title><link>http://notes.jerzygangi.com/how-to-put-a-prompt-before-gets-chomp-in-ruby/</link><pubDate>Tue, 18 Nov 2014 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/how-to-put-a-prompt-before-gets-chomp-in-ruby/</guid><description>Do you want to ask the user for input at the command line, using a slick 1980&amp;rsquo;s hacker movie prompt like this: &amp;gt;&amp;gt;?
Don&amp;rsquo;t use gets.chomp. Use readline instead:
require &amp;#39;readline&amp;#39; Readline.readline(&amp;#34;&amp;gt;&amp;gt;&amp;#34;) &amp;hellip;will output:
&amp;gt;&amp;gt; I can write stuff here</description></item><item><title>Moving around in Linux with pushd, popd, and dirs</title><link>http://notes.jerzygangi.com/moving-around-in-linux-with-pushd-popd-and-dirs/</link><pubDate>Tue, 18 Nov 2014 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/moving-around-in-linux-with-pushd-popd-and-dirs/</guid><description>&lt;p>Often when administering a Linux server, you move around between the same few directories. You &lt;code>cd&lt;/code> here, you &lt;code>cd&lt;/code> there, and then you &lt;code>cd&lt;/code> back here. Instead of &lt;code>cd&lt;/code>&amp;lsquo;ing so much, Linux has 3 powerful commands that can help you: &lt;code>pushd&lt;/code>, &lt;code>popd&lt;/code>, and &lt;code>dirs&lt;/code>.&lt;/p></description></item><item><title>My ssh config file template</title><link>http://notes.jerzygangi.com/my-ssh-config-file-template/</link><pubDate>Tue, 18 Nov 2014 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/my-ssh-config-file-template/</guid><description>&lt;p>If you ssh into servers, you &lt;em>must&lt;/em> set up a &lt;code>.ssh/config&lt;/code> file. It will allow you to type &lt;code>ssh myd&lt;/code> instead of &lt;code>ssh myuser@mydomain.com -i ~/.ssh/mykey.pem -p 1234&lt;/code>.&lt;/p></description></item><item><title>reverse-i-search'ing in the Linux shell</title><link>http://notes.jerzygangi.com/reverse-i-search-in-the-linux-shell/</link><pubDate>Tue, 18 Nov 2014 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/reverse-i-search-in-the-linux-shell/</guid><description>&lt;p>When you press &lt;code>ctrl+r&lt;/code> in the shell, you activate a feature called &amp;ldquo;reverse-i-search.&amp;rdquo; Reverse-i-search&amp;rsquo;ing lets you search through your shell history commands, from most recent to oldest.&lt;/p></description></item><item><title>Should I use gets.chomp or Readline for user input in Ruby?</title><link>http://notes.jerzygangi.com/should-i-use-gets-chomp-or-readline-for-user-input-in-ruby/</link><pubDate>Tue, 18 Nov 2014 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/should-i-use-gets-chomp-or-readline-for-user-input-in-ruby/</guid><description>Use Readline.readline(). That&amp;rsquo;s what irb uses for user input.
Don&amp;rsquo;t use gets.chomp.</description></item><item><title>How to delete a database in SQL</title><link>http://notes.jerzygangi.com/how-to-delete-a-database-in-sql/</link><pubDate>Mon, 17 Nov 2014 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/how-to-delete-a-database-in-sql/</guid><description>DROPDATABASEname_of_database_goes_here;</description></item><item><title>How to get rid of control characters like ^[[D in Ruby's gets.chomp</title><link>http://notes.jerzygangi.com/how-to-get-rid-of-control-characters-in-ruby-gets-chomp/</link><pubDate>Mon, 17 Nov 2014 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/how-to-get-rid-of-control-characters-in-ruby-gets-chomp/</guid><description>&lt;p>You&amp;rsquo;re coding some Ruby. You use &lt;code>gets.chomp&lt;/code> to get user input. You run your ruby file. You type some text at the prompt. Looks good, right? But then you press the left arrow key and&amp;hellip; &lt;code>^[[D&lt;/code> appears on the screen. WTF is that?&lt;/p></description></item><item><title>Should I use Turbolinks in Rails?</title><link>http://notes.jerzygangi.com/should-i-use-turbolinks-in-rails/</link><pubDate>Sun, 16 Nov 2014 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/should-i-use-turbolinks-in-rails/</guid><description>No.
(Don&amp;rsquo;t believe me? Google it.)</description></item><item><title>VIM Cheat Sheet</title><link>http://notes.jerzygangi.com/vim-cheat-sheet/</link><pubDate>Sat, 15 Nov 2014 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/vim-cheat-sheet/</guid><description>&lt;p>After 9 years of TextMate, I&amp;rsquo;m switching to &lt;code>vim&lt;/code>. I&amp;rsquo;m writing this cheat sheet as I learn. Check back often.&lt;/p></description></item><item><title>How to check if Bash is vulnerable to Heartbleed</title><link>http://notes.jerzygangi.com/how-to-check-if-bash-is-vulnerable-to-heartbleed/</link><pubDate>Wed, 05 Nov 2014 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/how-to-check-if-bash-is-vulnerable-to-heartbleed/</guid><description>Run this line in your Bash console:
env x=&amp;#39;() { :;}; echo vulnerable&amp;#39; bash -c &amp;#34;only this line should appear&amp;#34; If you see this, your Bash is vulnerable to Heartbleed:
vulnerable only this line should appear If you see this, your Bash is secure from Heartbleed:
only this line should appear</description></item><item><title>How to programatically control Wordpress with Ruby using XML-RPC</title><link>http://notes.jerzygangi.com/how-to-programatically-control-wordpress-with-ruby-using-xml-rpc/</link><pubDate>Sun, 02 Nov 2014 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/how-to-programatically-control-wordpress-with-ruby-using-xml-rpc/</guid><description>&lt;p>This week, I wanted to programatically create posts on my Wordpress site, &lt;a href="http://www.maxims.us">Maxims&lt;/a>. Unfortunately, all of the example code I found online for controlling Wordpress was using PHP, and I hate PHP. I wanted to control Wordpress with Ruby using XML-RPC.&lt;/p></description></item><item><title>How to obtain the number of files in a folder, recursively, using Ruby</title><link>http://notes.jerzygangi.com/how-to-obtain-the-number-of-files-in-a-folder-recursively-using-ruby/</link><pubDate>Sat, 01 Nov 2014 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/how-to-obtain-the-number-of-files-in-a-folder-recursively-using-ruby/</guid><description>I have often found myself wanting to know how many files are in a folder, including files in sub-folders. I whipped up a little Ruby code for just that:
folder_to_count = &amp;#34;/path/to/folder&amp;#34; # You should change this begin file_count = Dir.glob(File.join(folder_to_count, &amp;#39;**&amp;#39;, &amp;#39;*&amp;#39;)).select { |file| File.file?(file) }.count rescue puts &amp;#34;ERROR: The number of files could not be obtained&amp;#34; # typically occurs if folder_to_count does not exist end</description></item><item><title>The location of Postfix's main config file in Linux</title><link>http://notes.jerzygangi.com/the-location-of-postfix-main-config-file-in-linux/</link><pubDate>Sat, 01 Nov 2014 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/the-location-of-postfix-main-config-file-in-linux/</guid><description>On Linux, Postfix&amp;rsquo;s main configuration file, main.cf, is located at:
/etc/postfix/main.cf</description></item><item><title>Get Safari's Reading List programmatically with Ruby</title><link>http://notes.jerzygangi.com/get-safari-reading-list-programmatically-with-ruby/</link><pubDate>Sun, 26 Oct 2014 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/get-safari-reading-list-programmatically-with-ruby/</guid><description>&lt;p>I wanted to export my Safari Reading List on OS X, so I wrote some code to do it. I leveraged Ruby, but this methodology could be easily ported to other languages like Bash, Python, or Objective C.&lt;/p></description></item><item><title>How to make a ruby file executable</title><link>http://notes.jerzygangi.com/how-to-make-a-ruby-file-executable/</link><pubDate>Sun, 19 Oct 2014 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/how-to-make-a-ruby-file-executable/</guid><description>In the ruby file:
#!/usr/bin/env ruby puts &amp;#39;Hello world&amp;#39; At the command line:
chmod +x ruby.rb Then you can execute it like this:
./ruby.rb</description></item><item><title>CEVA (Amazon) phone number</title><link>http://notes.jerzygangi.com/ceva-amazon-phone-number/</link><pubDate>Sat, 18 Oct 2014 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/ceva-amazon-phone-number/</guid><description>(800) 592-7489
This is the number for CEVA, the company that delivers oversized / bulk items for Amazon.
I wasted 15 minutes trying to find their phone number.</description></item><item><title>Everything I know about writing for the web in 60 seconds</title><link>http://notes.jerzygangi.com/everything-i-know-about-writing-for-the-web-in-60-seconds/</link><pubDate>Thu, 16 Oct 2014 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/everything-i-know-about-writing-for-the-web-in-60-seconds/</guid><description>&lt;p>I used to charge consulting clients thousands of dollars for this knowledge. I no longer consult, so I&amp;rsquo;m giving away my secrets&amp;hellip; for free.&lt;/p>
&lt;p>(You&amp;rsquo;re welcome.)&lt;/p></description></item><item><title>Toggling two code blocks</title><link>http://notes.jerzygangi.com/toggling-two-code-blocks/</link><pubDate>Thu, 16 Oct 2014 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/toggling-two-code-blocks/</guid><description>&lt;p>Often when debugging code, you toggle between two blocks of code. You comment in one block, and comment out the other block. As simple as it sounds, going back and forth dozens of times can become quite annoying.&lt;/p></description></item><item><title>How to dump all MySQL databases to a gzip file from inside a bash script</title><link>http://notes.jerzygangi.com/how-to-dump-all-mysql-databases-to-a-gzip-file-from-inside-a-bash-script/</link><pubDate>Wed, 12 Mar 2014 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/how-to-dump-all-mysql-databases-to-a-gzip-file-from-inside-a-bash-script/</guid><description>Often as part of an hourly, daily, or weekly server backup bash script, you will wish to dump all MySQL databases to disk as a gzip file. This way, in the case that any of your databases suffer from corruption or user error, you will have a backup.
Simply put this command inside your cron-scheduled backup bash script, substituting the USERNAME, PASSWORD, and the destination path with your info:
#!/bin/bash mysqldump -u USERNAME -pPASSWORD --all-databases --routines| gzip &amp;gt; /mysqlbackups/MySQLDB_`date &amp;#39;+%m-%d-%Y&amp;#39;`.</description></item><item><title>The best PGP tutorial for Mac OS X, ever</title><link>http://notes.jerzygangi.com/the-best-pgp-tutorial-for-mac-os-x-ever/</link><pubDate>Wed, 12 Mar 2014 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/the-best-pgp-tutorial-for-mac-os-x-ever/</guid><description>&lt;p>When I decided to set up my Mac with PGP encrypted communications, I could not believe how hard it was &amp;ndash; not just to set up the software, but to understand how to use PGP properly. There was no &amp;ldquo;PGP for Dummies&amp;rdquo; tutorial for OS X on the internet. So I decided to write one. This is my über simple, nerd-free tutorial for anyone on Mac. In it, I will:&lt;/p>
&lt;ol>
&lt;li>Cover exactly how to install and configure PGP on OS X&lt;/li>
&lt;li>Demonstrate how to use PGP in real life&lt;/li>
&lt;/ol></description></item><item><title>Creating a ruby launchd task with RVM in OS X</title><link>http://notes.jerzygangi.com/creating-a-ruby-launchd-task-with-rvm-in-os-x/</link><pubDate>Sun, 02 Mar 2014 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/creating-a-ruby-launchd-task-with-rvm-in-os-x/</guid><description>&lt;p>In the last few years, ruby has taken the world by storm. With different projects dependent on different versions of Ruby, many Rails, Jekyll, and Sinatra programmers have installed RVM to manage their ruby versions in OS X. I am one of them.&lt;/p>
&lt;p>While RVM is awesome, it can make some previously simple tasks difficult. One such example is creating a &lt;code>launchd&lt;/code> daemon that invokes a ruby script. If your gems are installed with RVM, you will need to use RVM to write your daemon. That&amp;rsquo;s where it gets complicated.&lt;/p>
&lt;p>This tutorial teaches you how to schedule a ruby task on OS X using &lt;code>launchd&lt;/code>. You can schedule any ruby file to be run. It will be executed using the RVM ruby version of your choice.&lt;/p></description></item><item><title>How to automatically move downloaded files to your desktop in OS X</title><link>http://notes.jerzygangi.com/how-to-automatically-move-downloaded-files-to-your-desktop-in-os-x/</link><pubDate>Sun, 02 Mar 2014 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/how-to-automatically-move-downloaded-files-to-your-desktop-in-os-x/</guid><description>&lt;p>Left unchecked, your OS X &lt;code>~/Downloads&lt;/code> folder can grow into a jungle. I solved that problem by setting up an Automator script to move everything from my &lt;code>~/Downloads&lt;/code> folder to my &lt;code>~/Desktop&lt;/code>. Once a day, I clean off my &lt;code>~/Desktop&lt;/code>. This is a quick tutorial how to set your Mac to do the same.&lt;/p></description></item><item><title>How to populate a select menu with option tags, using jQuery</title><link>http://notes.jerzygangi.com/how-to-populate-a-select-menu-with-option-tags-using-jquery/</link><pubDate>Sun, 02 Mar 2014 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/how-to-populate-a-select-menu-with-option-tags-using-jquery/</guid><description>&lt;p>This code populates a &lt;code>&amp;lt;select&amp;gt;&lt;/code> menu with different &lt;code>&amp;lt;option&amp;gt;&lt;/code> tags. This code is useful when you wish to change the contents of a HTML dropdown menu programatically.&lt;/p></description></item><item><title>How to start and stop Apache 2 in Ubuntu Linux</title><link>http://notes.jerzygangi.com/how-to-start-and-stop-apache-2-in-ubuntu-linux/</link><pubDate>Sun, 02 Mar 2014 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/how-to-start-and-stop-apache-2-in-ubuntu-linux/</guid><description>How to start Apache 2:
sudo service apache2 start How to stop Apache 2:
sudo service apache2 stop How to restart Apache 2:
sudo service apache2 restart How to reload Apache 2:
sudo service apache2 reload Reloading is useful if you change a virtualhost file, since it will not actually stop Apache. Therefore, your websites will not go offline (even for a few seconds).</description></item><item><title>In OS X, should I use cron or launchd?</title><link>http://notes.jerzygangi.com/in-os-x-should-i-use-cron-or-launchd/</link><pubDate>Sun, 02 Mar 2014 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/in-os-x-should-i-use-cron-or-launchd/</guid><description>Use launchd. Do not use cron on OS X.
Source: the launchd man page.</description></item><item><title>The percentage of people who are mentally unhealthy</title><link>http://notes.jerzygangi.com/the-percentage-of-people-who-are-mentally-unhealthy/</link><pubDate>Sun, 02 Mar 2014 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/the-percentage-of-people-who-are-mentally-unhealthy/</guid><description>&lt;p>This year I have been conducting research concerning the percentage of mentally unhealthy people for an upcoming project.&lt;/p>
&lt;p>I am interested in:&lt;/p>
&lt;ul>
&lt;li>Statistics about America, other countries, and global&lt;/li>
&lt;li>Not just mental illnesses (Skitzophrenia, Bipolar disorder, Autism spectrum), but also less several mental unhealth (difficulty holding long-term relationships, not feeling fulfilled, phobias).&lt;/li>
&lt;li>The precise definition of mental health and mental illness&lt;/li>
&lt;li>Conducting primary research, if necessary&lt;/li>
&lt;/ul></description></item><item><title>What does the at sign (@) mean in OS X permissions?</title><link>http://notes.jerzygangi.com/what-does-the-at-sign-mean-in-os-x-permissions/</link><pubDate>Sun, 02 Mar 2014 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/what-does-the-at-sign-mean-in-os-x-permissions/</guid><description>&lt;p>If you run &lt;code>ls&lt;/code> on a file or folder in OS X&amp;hellip;&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">ls -la /dir/to/some_file_or_folder&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;p>You may see a permission entry like this:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">-rwxr--r--@ &lt;span class="m">1&lt;/span> john admins &lt;span class="m">548&lt;/span> Oct &lt;span class="m">29&lt;/span> 15:58 filename.plist&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div></description></item><item><title>Where to put custom bash scripts in OS X</title><link>http://notes.jerzygangi.com/where-to-put-custom-bash-scripts-in-os-x/</link><pubDate>Sun, 02 Mar 2014 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/where-to-put-custom-bash-scripts-in-os-x/</guid><description>If you make a custom bash script in OS X, and you want everyone on the system to be able to access it, this is the directory where you should save it:
/usr/local/bin</description></item><item><title>1,001 totally modern Photoshop layer styles every designer must have</title><link>http://notes.jerzygangi.com/1001-totally-modern-photoshop-layer-styles-every-designer-must-have/</link><pubDate>Sat, 01 Mar 2014 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/1001-totally-modern-photoshop-layer-styles-every-designer-must-have/</guid><description>&lt;p>After ten years of designing websites in Photoshop, I have amassed a giant collection of layer styles. I have used these layer styles on everything from pet projects to $100,000+ websites&amp;hellip; and now they can be yours. If you call yourself a web designer, this is a &lt;em>must have&lt;/em> download.&lt;/p>
&lt;p>&lt;img src="http://notes.jerzygangi.com/images/photoshop-layer-styles.png" alt="My Photoshop layer styles window">&lt;/p></description></item><item><title>How to add a user to a group in Linux</title><link>http://notes.jerzygangi.com/how-to-add-a-user-to-a-group-in-linux/</link><pubDate>Sat, 01 Mar 2014 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/how-to-add-a-user-to-a-group-in-linux/</guid><description>Simply replace USERNAME and GROUPNAME with the user you wish to add to a group:
sudo adduser USERNAME GROUPNAME</description></item><item><title>How to add all new files in a folder to SVN</title><link>http://notes.jerzygangi.com/how-to-add-all-new-files-in-a-folder-to-svn/</link><pubDate>Sat, 01 Mar 2014 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/how-to-add-all-new-files-in-a-folder-to-svn/</guid><description>If you add a bunch of new files to an SVN-managed folder, you do not need to svn add... each file manually. Just cd into the folder and type:
svn add ./ --force</description></item><item><title>How to change a line into a shape in Illustrator</title><link>http://notes.jerzygangi.com/how-to-change-a-line-into-a-shape-in-illustrator/</link><pubDate>Sat, 01 Mar 2014 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/how-to-change-a-line-into-a-shape-in-illustrator/</guid><description>&lt;p>In Illustrator, there are line objects and shape objects. Lines are made of points, and shapes are made of boundaries. Since line objects are not easily resized or manipulated, you will want to convert your line into a shape.&lt;/p></description></item><item><title>How to change ownership recurisively in Linux</title><link>http://notes.jerzygangi.com/how-to-change-ownership-recursively-in-linux/</link><pubDate>Sat, 01 Mar 2014 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/how-to-change-ownership-recursively-in-linux/</guid><description>&lt;p>Run this command, replacing &lt;code>USER&lt;/code> and &lt;code>GROUP&lt;/code> with the user and group to which you would like the files changed; substitute &lt;code>DIRECTORY&lt;/code> for the folder whose ownership you would like to change:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">chown -R USER:GROUP ./DIRECTORY&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div></description></item><item><title>How to download Wordpress in Linux</title><link>http://notes.jerzygangi.com/how-to-download-wordpress-in-linux/</link><pubDate>Sat, 01 Mar 2014 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/how-to-download-wordpress-in-linux/</guid><description>Every time you set up a new Wordpress site in Linux, you will need to download a fresh copy of Wordpress. Here&amp;rsquo;s the fastest way:
wget http://wordpress.org/latest.tar.gz tar -xzvf latest.tar.gz</description></item><item><title>How to dump a MySQL database</title><link>http://notes.jerzygangi.com/how-to-dump-a-mysql-database/</link><pubDate>Sat, 01 Mar 2014 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/how-to-dump-a-mysql-database/</guid><description>&lt;p>There are many cases where you will want to dump a MySQL database. Examples include: backing up a website, migrating a website to a new server, moving from a development machine to a production server, and more.&lt;/p>
&lt;p>Simply run this command, substituting the &lt;code>USERNAME&lt;/code>, &lt;code>DATABASE_NAME&lt;/code>, and &lt;code>FILENAME&lt;/code> with your info. When you run this command, it will prompt you for the MySQL password for the &lt;code>USERNAME&lt;/code> you provided:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">mysqldump -u USERNAME -p DATABASE_NAME &amp;gt; FILENAME.sql&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div></description></item><item><title>How to get the Ubuntu version from the commandline</title><link>http://notes.jerzygangi.com/how-to-get-the-ubuntu-version-from-the-commandline/</link><pubDate>Sat, 01 Mar 2014 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/how-to-get-the-ubuntu-version-from-the-commandline/</guid><description>lsb_release -a Look for the line that starts with Release:. The following number is your version number. As of this writing, mine says Release: 12.04, which means I am running Ubuntu version 12.04.</description></item><item><title>How to get your Postfix version</title><link>http://notes.jerzygangi.com/how-to-get-your-postfix-version/</link><pubDate>Sat, 01 Mar 2014 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/how-to-get-your-postfix-version/</guid><description>postconf mail_version You will see something like this: mail_version = 2.9.6. In this case, your Postfix version is 2.9.6.</description></item><item><title>How to import a .sql file into a MySQL database</title><link>http://notes.jerzygangi.com/how-to-import-a-sql-file-into-a-mysql-database/</link><pubDate>Sat, 01 Mar 2014 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/how-to-import-a-sql-file-into-a-mysql-database/</guid><description>&lt;p>First, create a new, empty MySQL database from the &lt;a href="http://notes.jerzygangi.com/how-to-open-the-mysql-console/">MySQL console&lt;/a>:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-mysql" data-lang="mysql">&lt;span class="line">&lt;span class="cl">&lt;span class="k">create&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="k">database&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="n">DATABASE_NAME&lt;/span>&lt;span class="p">;&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;p>Then, import the &lt;code>.sql&lt;/code> file into it:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">mysql -u root -p -h localhost DATABASE_NAME &amp;lt; FILE_TO_IMPORT.sql&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div></description></item><item><title>How to list all users in Linux</title><link>http://notes.jerzygangi.com/how-to-list-users-in-linux/</link><pubDate>Sat, 01 Mar 2014 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/how-to-list-users-in-linux/</guid><description>cat /etc/passwd</description></item><item><title>How to open the MySQL console</title><link>http://notes.jerzygangi.com/how-to-open-the-mysql-console/</link><pubDate>Sat, 01 Mar 2014 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/how-to-open-the-mysql-console/</guid><description>&lt;p>The MySQL console allows you to directly execute SQL commands, without having to use a programming language adapter such as PHP, Ruby, or Python.&lt;/p>
&lt;p>Run this command, replacing &lt;code>USERNAME&lt;/code> with your MySQL username; you will be prompted for the password.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">mysql -u USERNAME -p -h localhost&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div></description></item><item><title>How to remove the dotted border from around select tags in Firefox</title><link>http://notes.jerzygangi.com/how-to-remove-the-dotted-border-from-around-select-tags-in-firefox/</link><pubDate>Sat, 01 Mar 2014 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/how-to-remove-the-dotted-border-from-around-select-tags-in-firefox/</guid><description>CSS form styling is an increasingly common design trend. If you do style your &amp;lt;form&amp;gt; elements, applying some CSS to a &amp;lt;select&amp;gt; tag can be really cool. Except in Firefox, which displays a rather annoying dotted border around the &amp;lt;select&amp;gt; tag.
Here&amp;rsquo;s how to get rid of it:
select:-moz-focusring { color: transparent; text-shadow: 0 0 0 #000; }</description></item><item><title>How to restart postfix in Ubuntu Linux</title><link>http://notes.jerzygangi.com/how-to-restart-postfix-in-ubuntu-linux/</link><pubDate>Sat, 01 Mar 2014 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/how-to-restart-postfix-in-ubuntu-linux/</guid><description>sudo /etc/init.d/postfix restart N.B. I am running Ubuntu 12.04 LTS and Postfix 2.9.6.</description></item><item><title>How to set folder permissions and ownership for Apache website data</title><link>http://notes.jerzygangi.com/how-to-set-folder-permissions-and-ownership-for-apache-website-data/</link><pubDate>Sat, 01 Mar 2014 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/how-to-set-folder-permissions-and-ownership-for-apache-website-data/</guid><description>Whenever I upload a new folder to my website, I set its permissions and ownership:
sudo chmod -R g+rw /var/www/my-website.com/new-folder/ sudo chown -R www-data:www-data /var/www/my-website.com/new-folder/</description></item><item><title>How to set up a new virtualhost domain in Apache 2</title><link>http://notes.jerzygangi.com/how-to-set-up-a-new-virtualhost-domain-in-apache-2/</link><pubDate>Sat, 01 Mar 2014 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/how-to-set-up-a-new-virtualhost-domain-in-apache-2/</guid><description>&lt;p>This guide will show you how to quickly set up a new website in Apache 2 using virtualhosts. Follow these instructions exactly as written, down to the character: trailing slashes, case, line breaks, etc.&lt;/p>
&lt;p>Start by firing up a terminal, and creating a folder for the new website:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">mkdir /var/www/my-new-website.com&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div></description></item><item><title>How to show hidden files in Finder OS X</title><link>http://notes.jerzygangi.com/how-to-show-hidden-files-in-finder-os-x/</link><pubDate>Sat, 01 Mar 2014 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/how-to-show-hidden-files-in-finder-os-x/</guid><description>To show hidden files in Finder, type this into the Terminal:
defaults write com.apple.finder AppleShowAllFiles TRUE killall Finder To set things back to normal, type this:
defaults write com.apple.finder AppleShowAllFiles FALSE killall Finder</description></item><item><title>How to unzip a file on the Linux commandline</title><link>http://notes.jerzygangi.com/how-to-unzip-a-file-on-the-linux-commandline/</link><pubDate>Sat, 01 Mar 2014 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/how-to-unzip-a-file-on-the-linux-commandline/</guid><description>In order for this to work, the unzip command must be installed. If you do not have unzip on your system, install it using the package manager for your distro (apt-get, etc.).
unzip ./FILE_NAME.zip</description></item><item><title>I love this recording and mastering style</title><link>http://notes.jerzygangi.com/i-love-this-recording-and-mastering-style/</link><pubDate>Sat, 01 Mar 2014 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/i-love-this-recording-and-mastering-style/</guid><description>Yesterday I found this recording of Rodelinda, Hwv 19: Act I - &amp;ldquo;Art Thou Troubled?&amp;rdquo; by G.F. Handel. I love the recording and mastering style the engineer used. The micing is obviously very close, and there is ample mastering going on &amp;ndash; definately some chorus, and probably some autotune. It sounds like some of the parts are doubled, maybe.
If I ran the Grammys, I would give them a recording award!</description></item><item><title>My minimal Apache2 virtualhost file</title><link>http://notes.jerzygangi.com/my-minimal-apache-2-virtualhost-file/</link><pubDate>Sat, 01 Mar 2014 00:00:00 +0000</pubDate><guid>http://notes.jerzygangi.com/my-minimal-apache-2-virtualhost-file/</guid><description>&lt;p>I have written at length about how administering a Linux server is a nightmare. It does not matter how smart, experienced, or nerdy you are. Everyone who uses Linux bangs their head against a wall from time to time.&lt;/p></description></item><item><title>JJ's Software Rules</title><link>http://notes.jerzygangi.com/jjs-software-rules/</link><pubDate>Thu, 27 Feb 2014 00:15:00 +0000</pubDate><guid>http://notes.jerzygangi.com/jjs-software-rules/</guid><description>&lt;p>In 17 years of writing code and leading teams, I&amp;rsquo;ve slowly built a list of software development rules. These rules allow high-quality code to be written quickly. I ask every engineering organization I lead to follow these rules.&lt;/p></description></item><item><title>About</title><link>http://notes.jerzygangi.com/about/</link><pubDate>Tue, 13 Mar 2001 19:45:00 +0000</pubDate><guid>http://notes.jerzygangi.com/about/</guid><description>I am a software leader residing in the city of San Francisco, California. My specialty is Ruby on Rails with Javascript, but I also enjoy iOS development with Objective-C. This blog is where I give back to the internet community, with tidbits, minutia, and the occasional breath of fresh air.
I love a worthy challenge &amp;ndash; whether that&amp;rsquo;s a technical challenge, an intellectual challenge, or a personal challenge. Challenges are how we contextualize and inspire growth to make the world a better place.</description></item></channel></rss>