- Start: be sidekiq -d -L log/sidekiq.log
- Stop: ps -ef | grep sidekiq | grep -v grep | awk '{print $2}' | xargs kill -9
- Start: elasticsearch --config=/usr/local/opt/elasticsearch/config/elasticsearch.yml
- Start: redis-server /usr/local/etc/redis.conf
| { | |
| "auto_complete": false, | |
| "auto_find_in_selection": true, | |
| "color_scheme": "Packages/Color Scheme - Default/Monokai.sublime-color-scheme", | |
| "ensure_newline_at_eof_on_save": true, | |
| "file_exclude_patterns": | |
| [ | |
| "*.pyc", | |
| "*.pyo", | |
| "*.exe", |
| # put this in your staging.rb file. Obviously you'll need more config than this it's just an example. | |
| Rails.application.configure do | |
| config.action_mailer.preview_path ||= defined?(Rails.root) ? "#{Rails.root}/spec/mailers/previews" : nil | |
| config.action_mailer.show_previews = true | |
| end | |
| # Without the following would display "For security purposes, this information is only available to local requests" | |
| class ::Rails::MailersController | |
| include Rails.application.routes.url_helpers |
| # app/controllers/application_controller.rb | |
| class ApplicationController < ActionController::Base | |
| # Prevent CSRF attacks by raising an exception. | |
| # For APIs, you may want to use :null_session instead. | |
| protect_from_forgery with: :exception | |
| add_flash_types :success, :error | |
| # See: | |
| # https://stackoverflow.com/questions/2385799/how-to-redirect-to-a-404-in-rails |
| require 'logger' | |
| require 'colorize' | |
| # This class provides a way for other modules or classes to have a | |
| # logger automatically available, not having to define any other methods | |
| # | |
| # Examples | |
| # | |
| # module Mod | |
| # include Loggable.new(progname: 'bla') |
| log = [ | |
| {time: 201201, x: 2}, | |
| {time: 201201, y: 7}, | |
| {time: 201201, z: 2}, | |
| {time: 201202, a: 3}, | |
| {time: 201202, b: 4}, | |
| {time: 201202, c: 0} | |
| ] | |
| def collapse_entries log |
| svndiff() { | |
| svn diff -x --ignore-all-space "${@}" | colordiff | |
| } |
| require 'fileutils' | |
| module FileUtils | |
| def self.convert_file_encoding inputfile, encoding='utf-8' | |
| if File.exists? inputfile | |
| file_info = %x{file -ib #{inputfile}} | |
| file_info =~ /charset=(.*)/ | |
| file_charset = $1 |
| [user] | |
| name = nunommc | |
| email = [email protected] | |
| [color] | |
| ui = auto | |
| decorate = short | |
| [alias] | |
| ci = commit |