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:
| # firsrun: | |
| # install xcode-cli-tools | |
| # xcode-select --install | |
| # install homebrew | |
| # ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
| # install caskroom | |
| # brew install caskroom/cask/brew-cask | |
| # update/install: |
| var zlib = require('zlib'); | |
| var gunzip = zlib.createGunzip(); | |
| var buf1 = new Buffer("...", "base64") | |
| var buf2 = new Buffer("...", "base64") | |
| var buf3 = new Buffer("...", "base64") | |
| var buf = Buffer.concat([buf1, buf2, buf3]) | |
| zlib.gunzip(buf, function(err, dezipped) { | |
| console.log(dezipped.toString()) | |
| }); |
I hereby claim:
To claim this, I am signing this object:
| // Copy and paste this script into the Javascript console at https://www.vimgolf.com | |
| // and you get a tab delimited list of the entries that can be copied and pasted | |
| // into a spreadsheet. | |
| var resultString = []; | |
| $('#content .grid_7 div h5').each(function(i, e) { | |
| var $link = $(e).find('a'); | |
| var url = 'https://www.vimgolf.com' + $link.attr('href'); | |
| var urlParts = url.split('/'); | |
| var challengeID = urlParts[urlParts.length - 1]; |
| // 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 = [] |
| // 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 | |
| } |
| 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) |
| const handleConfirm = link => { | |
| // Do your thing | |
| } | |
| Rails.delegate(document, 'a[data-confirm-swal]', 'click', handleConfirm) |
| document.addEventListener('rails:attachBindings', element => { | |
| Rails.delegate(document, 'a[data-confirm-swal]', 'click', handleConfirm) | |
| }) |