Skip to content

Instantly share code, notes, and snippets.

@xhocquet
xhocquet / bookmarklets.js
Created March 28, 2024 03:52 — forked from stoerr/bookmarklets.js
A couple of ChatGPT bookmarklets to summarize text from the current page, or generate text
/* jshint -W028 */
// bookmarklets to summarize the shown webpage.
// replace XXXInsertAPIKeyHereXXX with your API key to use these bookmarklets.
// this summarizes the text on the page. (We might have to cut it down to 3000 words, because the API has a limit of 3000 words.)
javascript:(async () => {
var apikey = "XXXInsertAPIKeyHereXXX";
const maxwordcount = 2500;
try {
module ActionController
class Parameters
private
def unpermitted_parameters!(params)
unpermitted_keys = unpermitted_keys(params)
if unpermitted_keys.any?
case self.class.action_on_unpermitted_parameters
when :log
name = "unpermitted_parameters.action_controller"
module ActiveLinkTo
extend ActiveSupport::Concern
included do
helper_method :active_link_to
def active_link_to(name = nil, options = nil, html_options = nil, &block)
html_options, options, name = options, name, block if block_given?
options ||= {}
html_options = convert_options_to_data_attributes(options, html_options)
@xhocquet
xhocquet / gist:9b872b18a11915742dc6480364e05e5d
Created February 27, 2019 22:36
Docutech Integration mermaid.io Markup
```mermaid
sequenceDiagram
Docutech->>Maxwell: Document Distribution event
Maxwell->>Docutech: Success Response
Note right of Maxwell: Process event:<br>Create task<br>Send notifications
Maxwell->>Docutech: User click to sign (iframe)
Note left of Docutech: User completes<br>signing
Docutech->>Maxwell: Subsequent document event
Note right of Maxwell: Mark task as<br>complete/error
Maxwell->>Docutech: Request signed documents
@xhocquet
xhocquet / config.yml
Created October 12, 2018 22:55
Rubocop + CircleCI
# One of the steps, insert where you wish:
- run:
name: run rubocop
command: |
source /home/circleci/.rvm/scripts/rvm
rvm --default use 2.3.1
bash bin/rubocop.sh
# Remove the RVM lines if not needed for your setup