I hereby claim:
- I am peterfication on github.
- I am peterfication (https://keybase.io/peterfication) on keybase.
- I have a public key ASC_g4c6ErfhnPFz892Od0c5GvZA-BVhu4RhxgBASalbSgo
To claim this, I am signing this object:
// This file has to be required before rails-ujs | |
// To use it change `data-confirm` of your links to `data-confirm-swal` | |
(function() { | |
const handleConfirm = function(element) { | |
if (!allowAction(this)) { | |
Rails.stopEverything(element) | |
} | |
} | |
const allowAction = element => { |
jobs: | |
build: | |
docker: | |
... | |
- image: docker.elastic.co/elasticsearch/elasticsearch:6.4.2 |
import { generateFetchLocale } from 'lib/utils' | |
import * as React from 'react' | |
import Button from 'templates/html/snippets/Button' | |
import Closing from 'templates/html/snippets/Closing' | |
import Footer from 'templates/html/snippets/Footer' | |
import FullWidthBorder from 'templates/html/snippets/FullWidthBorder' | |
import Greeting from 'templates/html/snippets/Greeting' | |
import Header from 'templates/html/snippets/Header' | |
import Layout from 'templates/html/snippets/Layout' |
const handleConfirm = link => { | |
// Do your thing | |
} | |
Rails.delegate(document, 'a[data-confirm-swal]', 'click', handleConfirm) |
// Override the default confirm dialog of Rails | |
Rails.handleConfirm = link => { | |
if (link.data('confirm') === undefined){ | |
return true | |
} | |
showSweetAlertConfirmationDialog(link) | |
return false | |
} |
// Override the default confirm dialog of Rails | |
$.rails.handleConfirm = link => { | |
if (link.data('confirm') === undefined){ | |
return true | |
} | |
showSweetAlertConfirmationDialog(link) | |
return false | |
} |
document.addEventListener('rails:attachBindings', element => { | |
Rails.delegate(document, 'a[data-confirm-swal]', 'click', handleConfirm) | |
}) |
import Rails from 'rails-ujs'; | |
const handleConfirm = () => { | |
// Do your thing | |
} | |
// Add event listener before the other Rails event listeners like the one | |
// for `method: :delete` | |
Rails.delegate(document, 'a[data-confirm-swal]', 'click', handleConfirm) |
// Analyze asana task export in JS console | |
// Format of a task title has to be "[estimated amount of time] title (Actual time used for the task)" | |
// It prints out the average deviation of the estimated time | |
// Open the export JSON in Chrome and run this script in the browser console | |
if (typeof(x) === 'undefined') { | |
const x = JSON.parse($('pre').innerHTML) | |
} | |
var differences = [] |
I hereby claim:
To claim this, I am signing this object: