To get the parent(s) of a pid, run the following command, where “123” equals the child pid:
ps -o ppid=123
To get the parent(s) of a pid, run the following command, where “123” equals the child pid:
ps -o ppid=123
To watch your current memory usage in real time, run the following command:
watch -n 5 free -m
If you’re running into the following error attempting to deploy via Capistrano with rbenv, foreman, and upstart:
-su: bundle: command not found
Then, be sure to take the export and eval rbenv statements in your ~/.bashrc file and copy them to the bottom of your ~/.profile
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
As this path will not be available to the user to run the necessary commands otherwise.
To turn off Amazon Kindle’s popular highlights on Android, do the following:
If you’ve made a commit, but want to revert the commit and retain the file changes as unstaged, do the following:
git reset --soft HEAD^
git reset HEAD
If you’re attempting to configure a Google Business App domain name for an email address alias and you’re running into this error:
DNS server returned answer with no data
Remember to setup the Google MX records after validating your domain name with Google. This is the next step in the Google -> Domains section for your new domain.
To list the commits of a single user from all branches, use the following command:
git log --pretty=format:"%ad:%an:%d:%B" --date=short --reverse --all --since=2.months.ago --author=Anthony
If you’re running into this error when attempting to install twitter-bootstrap-rails on Rails 4.2.x:
undefined method `register_preprocessor’
Note that there is currently a bug between less-rails and the 3.x version of sprockets-rails. To resolve this issue, update your gemfile with:
gem 'sprockets-rails', '<=2.3.3'
And then
bundle update sprockets-rails
After which, you should be good to go.
If you’re installing twitter-bootstrap-rails 3.x on Rails 4.x.x and running into the following error:
‘twitter/bootstrap/bootstrap.less’ wasn’t found
First, remember that Rails 4.x has removed the :asset group from the Gemfile syntax, so if you’re using the group :assets, you can simply remove the gems from the assets group and it should work.
In my case, I initially loaded a new rails application with 4.0.x, then upgraded to 4.2.5, without also upgrading the sass-rails version from 4.0.2 to 5.0. If you’ve removed the gems from the assets group, still running into the same error above, and your situation is similar, then try updating your Gemfile’s sass-rails line to:
gem 'sass-rails', '~> 5.0'
Then
bundle update sass-rails
to get the latest version.
To ensure the total width/height of your image is not affected by adding a CSS border, do the following:
outline: 2px solid #000;
outline-offset: -2px;