If you want to convert a local master branch (that is ahead of remote) into a branch bash git checkout master git branch experiment git reset --hard heroku/master git checkout experiment
bash require 'sidekiq/api' https://stackoverflow.com/questions/12683222/are-there-console-commands-to-look-at-whats-in-the-queue-and-to-clear-the-queue ```yml :verbose: false :concurrency: 15 :max...
openssl req -x509 -sha256 -nodes -newkey rsa:2048 -days 365 -keyout localhost.key -out localhost.crt then rails s -b 'ssl://localhost:3000?key=localhost.key&cert=localhost.crt' This will give y...
https://stackoverflow.com/questions/59432964/relational-data-model-for-double-entry-accounting https://medium.com/@RobertKhou/double-entry-accounting-in-a-relational-database-2b7838a5d7f8 https://c...
I ended up deleting master.key and credentials.yml.enc since I'd rather use development and production specific keys and credentials per below bash EDITOR="mate --wait" bin/rails credentials:edit -...
If the params you want to persist are state and order ruby <% request.params.slice('state', 'order').each do |key, value| %> <%= hidden_field_tag key, value %> <% end %>
% ps aux | grep ruby lukeko 29806 0.0 0.0 4277500 696 s000 S+ 6:49PM 0:00.00 <process you don't want> % kill -9 29806
Go to https://guides.rubyonrails.org/actiontextoverview.html Only extra things left to do is @import "trix/dist/trix";
git checkout c96a579 app/assets/stylesheets/menu.scss
```ruby class Post < ApplicationRecord belongsto :author, countercache: true end class Author < ApplicationRecord has_many :posts def self.updatecounters(id, counters) Author.find(id).dos...
using rm can be very dangerous if you're not careful -- get in the habit of using mv instead do this mv .git ~/.Trash instead of rm -rf .git the first command is safer on many levels
remove the commits from master as though you had made the branch before those commits were made git checkout master git branch branch-name git reset --hard <sha1>
git config --global alias.stush 'stash push -u -m' then instead of git stash push -u -m "helpful message" you can just do git stush 'helpful message'
if you just made a commit and want to change the message git commit --amend -m "better commit message"
takes your uncommitted changes (both staged and unstaged), saves them away for later use, and then reverts them git stash -u git checkout master git checkout crazy-experiment git stash pop stash ...