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
| # app/controllers/concerns/track_events.rb | |
| module TrackEvents | |
| extend ActiveSupport::Concern | |
| included do | |
| helper_method :render_data_layer_events | |
| delegate :tag, to: :view_context, private: true | |
| end | |
| def data_layer_events = flash[:data_layer_events] ||= [] |
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
| module HtmlTagHelper | |
| NORMAL_TAGS = %i[ | |
| a abbr address article aside audio b bdi bdo blockquote body button canvas caption | |
| cite code colgroup data datalist dd del details dfn dialog div dl dt em fieldset figcaption figure | |
| footer form h1 h2 h3 h4 h5 h6 header hgroup html i iframe ins kbd label legend li main map mark menu | |
| meter nav noscript object ol optgroup option output p picture pre progress q rp rt ruby s samp script | |
| section select small span strong style sub summary sup table tbody td template textarea tfoot th thead | |
| time title tr u ul var video | |
| ] |
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
| { | |
| "version": "0.2.0", | |
| "configurations": [ | |
| { | |
| "type": "node", | |
| "request": "launch", | |
| "name": "Zenn Preview", | |
| "runtimeExecutable": "npx", | |
| "runtimeArgs": ["zenn", "preview"], | |
| "cwd": "${workspaceFolder}", |
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
| module GtmHelper | |
| GTM_SCRIPT = "(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':" \ | |
| "new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0]," \ | |
| "j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=" \ | |
| "'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);" \ | |
| "})(window,document,'script','dataLayer','%s');".freeze | |
| GTM_IFRAME_URL = "https://www.googletagmanager.com/ns.html?id=%s".freeze | |
| def gtm_key = @gtm_key ||= Rails.application.config_for(:gtm)["key"] || "SET_GTM_KEY" | |
| def render_gtm_head = tag.script(GTM_SCRIPT % gtm_key, escape: false) |
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
| #!/bin/bash | |
| REPO="yapr/taskhub" | |
| temp_file=$(mktemp) | |
| gh issue list --repo "$REPO" --state open > "$temp_file" | |
| random_issue=$(shuf -n 1 "$temp_file") | |
| rm "$temp_file" | |
| issue_number=$(echo "$random_issue" | awk '{print $1}') | |
| gh issue view "$issue_number" --repo "$REPO" --web |
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
| $(document).one 'turbolinks:load', -> | |
| if document.documentElement.hasAttribute('data-turbolinks-preview') | |
| return | |
| headers = {} | |
| csrfTokenElement = document.querySelector('meta[name="csrf-token"]') | |
| headers['X-CSRF-Token'] = csrfTokenElement.content if csrfTokenElement | |
| $('div[data-render-async-path]').each (_i, div) -> | |
| $.ajax( | |
| url: $(this).data('render-async-path') | |
| method: 'GET' |
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
| # frozen_string_literal: true | |
| module Gretel | |
| module ViewHelpers | |
| delegate :breadcrumbs_json_ld, to: :gretel_renderer | |
| end | |
| class Renderer | |
| # rubocop:disable Rails/OutputSafety | |
| def breadcrumbs_json_ld |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| #!/bin/sh | |
| if [ $# -eq 0 ]; then | |
| echo "Usage:" | |
| echo "git wip (branch-name) (issue-number)" | |
| exit 2 | |
| fi | |
| issue_number='' | |
| issue_title='' | |
| branch_name=$1 | |
| if [ $# -eq 2 ]; then |
NewerOlder