Skip to content

Instantly share code, notes, and snippets.

View dportalesr's full-sized avatar
🇲🇽
🐱👨🏻‍💻💥👾

Daniel P dportalesr

🇲🇽
🐱👨🏻‍💻💥👾
View GitHub Profile
@erichrobinson
erichrobinson / README.md
Last active February 24, 2024 08:32
SwitchResX Configuration

#SwitchResX Settings for LG 21:9 UltraWide

SwitchResX is a utility that allows users to override the default resolution settings in OSX. For more information, including download links, vist http://www.madrau.com/ .

##Disabling System Integrity Protection (SIP)

If you are running OSX 10.11 or higher, SIP must be disabled. To disable SIP do the following:

  • Boot into the recovery partition by pressing CMD + R when starting up your Mac.
  • Once in recovery mode, open a terminal window.
  • Type the command csrutil disable
class SalesReportWorker < ApplicationController
include Sidekiq::Worker
sidekiq_options backtrace: true, retry: false
self.view_paths = "app/views" # Where to look for view templates
def perform(request_ident, params)
@_response = ActionDispatch::Response.new # Needed to avoid "ActionController::RackDelegation#content_type
# delegated to @_response.content_type, but @_response is nil" error
...
@iambibhas
iambibhas / scopes.txt
Last active April 8, 2024 20:37
Sublime Text 2: Snippet scopes
Here is a list of scopes to use in Sublime Text 2 snippets -
ActionScript: source.actionscript.2
AppleScript: source.applescript
ASP: source.asp
Batch FIle: source.dosbatch
C#: source.cs
C++: source.c++
Clojure: source.clojure
CoffeeScript: source.coffee
@lancejpollard
lancejpollard / Rails Nested Forms with belongs_to
Created January 13, 2010 23:09
Rails Nested Forms with belongs_to, doesn't work by default
# user.rb
class User < ActiveRecord::Base
belongs_to :address
accepts_nested_attributes_for :address # can't have allow_destroy
end
# users_controller.rb
class UsersController < ApplicationController