emacs --daemon to run in the background.
emacsclient.emacs24 <filename/dirname> to open in terminal
NOTE: "M-m and SPC can be used interchangeably".
- Undo -
C-/ - Redo -
C-? - Change case: 1. Camel Case :
M-c2. Upper Case :M-u
- Lower Case :
M-l
| RSpec::Core::RakeTask.module_eval do | |
| def pattern | |
| dir = EngineName.root # replace with you the name of your engine | |
| extras = [] | |
| if File.directory?( dir ) | |
| extras << File.join( dir, 'spec', '**', '*_spec.rb' ).to_s | |
| end | |
| [@pattern] | extras | |
| end | |
| end |
| class Article < ActiveRecord::Base # Product class is similar | |
| belongs_to :user | |
| has_many :media, as: :ownable | |
| with_options through: :media, source: :representable do |assn| | |
| assn.has_many :videos, source_type: 'Video' | |
| assn.has_many :images, source_type: 'Image' | |
| end | |
| end |
| # Rails 4 | |
| require 'action_view/helpers/asset_url_helper' | |
| module ActionView | |
| module Helpers | |
| module AssetUrlHelper | |
| def accept_encoding?(encoding) | |
| request = self.request if respond_to?(:request) | |
| return false unless request |
emacs --daemon to run in the background.
emacsclient.emacs24 <filename/dirname> to open in terminal
NOTE: "M-m and SPC can be used interchangeably".
C-/C-?M-c
2. Upper Case : M-uM-l| curl -XDELETE 'localhost:9200/test' | |
| curl -XPUT 'localhost:9200/test/doc/1' -d ' | |
| { | |
| "sentence" : "Hi!", | |
| "value" : 1 | |
| } | |
| ' |
| module MyJobs | |
| def self.backend | |
| @backend | |
| end | |
| def self.backend=(backend) | |
| @backend = backend | |
| end | |
| class Processor |
| The AWS Client VPN for Linux is only provided for Ubuntu as a .deb package. I need it for Fedora. This was tested on Fedora 33. | |
| https://docs.aws.amazon.com/vpn/latest/clientvpn-user/client-vpn-connect-linux.html | |
| Get the vpn client deb package. | |
| ``` | |
| curl https://d20adtppz83p9s.cloudfront.net/GTK/latest/awsvpnclient_amd64.deb -o awsvpnclient_amd64.deb | |
| ``` | |
| Install `alien` to convert the deb package to rpm. |
This is a gist used in the following blog posts: