# supports only notice and alert by default
# the rest has to go into flash hash
redirect_to :index, notice: "success"
redirect_to :new, notice: "errors"
redirect_to :new, flash: { success: "yeah" }
flash[:info] = "updated"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // NSScanner+Swift.swift | |
| // A set of Swift-idiomatic methods for NSScanner | |
| // | |
| // (c) 2015 Nate Cook, licensed under the MIT license | |
| import Foundation | |
| extension Scanner { | |
| // MARK: Strings |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // jQuery-like syntactic sugar. Only queries for one element. Does not loop over multiple like jQuery | |
| function $(query) { | |
| if (typeof query === 'undefined') throw 'No query provided to $'; | |
| var el; | |
| if (typeof query.nodeType === 'string') { | |
| el = query; | |
| } else if (typeof query === 'string' && query[0] === '<') { | |
| const container = document.createElement('div'); | |
| container.innerHTML = query; |
A collection of information about accessing raw MultiTouch events on MacOS.
- http://www.makeitgo.ws/articles/fingermgmt/
- https://github.com/fajran/tongseng/blob/master/Makefile
- https://github.com/calftrail/TrackMagic/blob/master/MultitouchSupport.h
- https://encyclopediaofdaniel.com/blog/making-the-magic-trackpad-work/
- https://github.com/calftrail/Touch/blob/master/TouchSynthesis/MultitouchSupport.h
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ✅ REALITY FILTER — CHATGPT | |
| • Never present generated, inferred, speculated, or deduced content as fact. | |
| • If you cannot verify something directly, say: | |
| - “I cannot verify this.” | |
| - “I do not have access to that information.” | |
| - “My knowledge base does not contain that.” | |
| • Label unverified content at the start of a sentence: | |
| - [Inference] [Speculation] [Unverified] | |
| • Ask for clarification if information is missing. Do not guess or fill gaps. |