How to set up multiple accounts with Mutt E-mail Client
Thanks to this article by Christoph Berg
Directories and files
~/| require "active_record" | |
| namespace :db do | |
| db_config = YAML::load(File.open('config/database.yml')) | |
| db_config_admin = db_config.merge({'database' => 'postgres', 'schema_search_path' => 'public'}) | |
| desc "Create the database" | |
| task :create do | |
| ActiveRecord::Base.establish_connection(db_config_admin) |
| <?php | |
| require_once __DIR__ . '/../vendor/autoload.php'; | |
| use Slim\Environment; | |
| class RoutesTest extends PHPUnit_Framework_TestCase | |
| { |
Thanks to this article by Christoph Berg
Directories and files
~/| HTTP status code symbols for Rails | |
| Thanks to Cody Fauser for this list of HTTP responce codes and their Ruby on Rails symbol mappings. | |
| Status Code Symbol | |
| 1xx Informational | |
| 100 :continue | |
| 101 :switching_protocols | |
| 102 :processing |
Fonte: http://brandon.invergo.net/news/2012-05-26-using-gnu-stow-to-manage-your-dotfiles.html?round=two
I accidentally stumbled upon something yesterday that I felt like sharing, which fell squarely into the "why the hell didn't I know about this before?" category. In this post, I'll describe how to manage the various configuration files in your GNU/Linux home directory (aka "dotfiles" like .bashrc) using GNU Stow.
The difficulty is that it would be helpful to manage one's configuration files with a version control system like Git, Mercurial or Bazaar, but many/most dotfiles reside at the top-level of your home directory, where it wouldn't be a good idea to initialize a VCS repository. Over time I've come across various programs which aim to manage this for you by keeping all the files in a subdirectory and then installing or linking them into their appropriate places. None of those programs ever really appealed to me. They would require a ton of dependencies (like Ruby and a ton of libraries for it) or t
via (https://www.linux.com/learn/tutorials/442438-vim-tips-folding-fun)
zf#j creates a fold from the cursor down # lines.zf/string creates a fold from the cursor to string .zj moves the cursor to the next fold.zk moves the cursor to the previous fold.zo opens a fold at the cursor.zO opens all folds at the cursor.zm increases the foldlevel by one.zM closes all open folds.| class MyJob < ActiveJob::Base | |
| queue_as :urgent | |
| rescue_from(NoResultsError) do | |
| retry_job wait: 5.minutes, queue: :default | |
| end | |
| def perform(*args) | |
| MyService.call(*args) | |
| end |
| %h1 All Users | |
| - table_for User.all do | |
| - column "Username" => :username | |
| - column "Email" => ->(m) { mail_to m.email } | |
| - column "Notes" => :notes |
I was implementing https://layer.com/ on https://zeemee.com and they require https for the callbacks. Since this was new to me and took me a while here's a how to if anyone is looking.
You already have a rails app running on localhost:3000