Skip to content

Instantly share code, notes, and snippets.

View kevinashworth's full-sized avatar
🏠
Working from home

Kevin Ashworth kevinashworth

🏠
Working from home
View GitHub Profile
javascript:h=location.href;i=h.indexOf(%27imdb.com%27);p=h.indexOf(%27https://pro.imdb.com%27);t=h.indexOf(%27title%27);c=h.indexOf(%27combined%27);f=h.indexOf(%27fullcredits%27);r=h.indexOf(%27reference%27);badword=Math.max(c,f,r);if(i==-1) {window.location=%27https://pro.imdb.com/name/nm2825198/%27}else if(p==0) {window.location=h.replace(%27https://pro%27,%27https://www%27)}else if(p==-1){if((t>1)&&(badword>1)){h=h.substring(0,badword)}window.location=h.replace(/https:\/\/[a-z]+/,%27https://pro%27);};
Sharing some bookmarklets for the new <a href="https://my.sagaftraplans.org/health/">SAG-AFTRA Health Plan Benefits Manager</a> site:
<ol>
<li><a href='javascript:void%20function(){var%20e=new%20Date,t=e.getDate(),a=e.getMonth()+1,n=e.getFullYear();10%3Et%26%26(t=%220%22+t),10%3Ea%26%26(a=%220%22+a),e=a+%22/%22+t+%22/%22+n,$(%22input%22)[6].value=%2201/01/2016%22,$(%22input%22)[7].value=e;$("#earningsForm\\:findBtn").click();}();'>Health 2016</a>
When I go the Earnings page, I tend to want to see my earnings from January 1, 2016 to today. This bookmarklet populates the date fields and presses the Find button.</li>
<li><a href='javascript:$(%22.ui-row-toggler%20span%22).click();$(%22.ui-datatable-even%22).switchClass(%22ui-datatable-even%22,%20%22ui-datatable-odd%22);'>Health All More</a>
Each row of the Earnings page has a "More" link at the end. This bookmarklet opens all of them at once.</li>
</ol>
Try them out by dragging the links to your bookmarks bar, then clicking on them — but only after you are l
@kevinashworth
kevinashworth / README.md
Created March 13, 2017 19:49 — forked from hofmannsven/README.md
My simply Git Cheatsheet
> This is a Quix Command File
>
> For the syntax of this file, please refer to https://www.quixapp.com/help/syntax/
>
@Replacement of Basic commands
@These are my replacments and switcheroos.
flickr http://flickr.com/search/?q=%s Flickr Search
flickrc http://flickr.com/search/?q=%s&l=comm Flickr Commercial use CC Search
f javascript:s='%s';if(s==''){void(s=prompt('Find%20text:',''));}s='('+s+')';x=new%20RegExp(s,'gi');rn=Math.floor(Math.random()*100);rid='z'%20+%20rn;b%20=%20document.body.innerHTML;b=b.replace(x,'<span%20name='%20+%20rid%20+%20'%20id='%20+%20rid%20+%20'%20style=\'color:#000;background-color:yellow;%20font-weight:bold;\'>$1</span>');void(document.body.innerHTML=b);alert('Found%20'%20+%20document.getElementsByName(rid).length%20+%20'%20matches.');window.scrollTo(0,document.getElementsByName(rid)[0].offsetTop); Switched f and find. Find in current page, usage: 'f test' will highlight all occurrences of 'test' and will take you to the first occurrence. Just 'f' will open a prompt.
<!-- https://maxl.us/hideyt --><style>#playerWrap{display: inline-block; position: relative;}#playerWrap.shown::after{content:""; position: absolute; top: 0; left: 0; bottom: 0; right: 0; cursor: pointer; background-color: black; background-repeat: no-repeat; background-position: center; background-size: 64px 64px; background-image: url(data:image/svg+xml;utf8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMjgiIGhlaWdodD0iMTI4IiB2aWV3Qm94PSIwIDAgNTEwIDUxMCI+PHBhdGggZD0iTTI1NSAxMDJWMEwxMjcuNSAxMjcuNSAyNTUgMjU1VjE1M2M4NC4xNSAwIDE1MyA2OC44NSAxNTMgMTUzcy02OC44NSAxNTMtMTUzIDE1My0xNTMtNjguODUtMTUzLTE1M0g1MWMwIDExMi4yIDkxLjggMjA0IDIwNCAyMDRzMjA0LTkxLjggMjA0LTIwNC05MS44LTIwNC0yMDQtMjA0eiIgZmlsbD0iI0ZGRiIvPjwvc3ZnPg==);}</style><div id="playerWrapOuter"> <div id="playerWrap"> <iframe width="640" height="360" src="https://www.youtube.com/embed/0sDg2h3M1RE?rel=0&enablejsapi=1" frameborder="0" ></iframe></div></div><script>(function(){let playerFrame=document.currentScript.previousElementSibling.q
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
/* Bookmarklet to Google Search the current site for a word or phrase. WIP. */
// h = location.href;
// url = new URL(h);
// tld = url.host;
// qs = prompt('Google Search on this site for:');
// gs = `https://www.google.com/search?q=site%3A${tld}+${qs}`;
// window.location = gs;
javascript:h%20=%20location.href;url%20=%20new%20URL(h);tld%20=%20url.host;qs%20=%20prompt(%27Google%20Search%20on%20this%20site%20for:%27);gs%20=%20`https://www.google.com/search?q=site%253A${tld}+${qs}`;window.location%20=%20gs;
@kevinashworth
kevinashworth / sw.js
Created March 19, 2020 17:48
Shortwave plus gs
SISW();
function SISW() {
var t = window.getSelection
? window.getSelection()
: (
document.getSelection
? document.getSelection()
: (
document.selection
? document.selection.createRange().text
@kevinashworth
kevinashworth / cypress-rsv.js
Last active November 16, 2020 20:17
Cypress command to select an option when using react-select-virtualized
// declare in commands.js
Cypress.Commands.add('chooseRSVOption', (selector, option) => {
const re = new RegExp(`^${option}$`) // exact match
cy.get(`${selector} .react-select-virtualized input`)
.click({ force: true })
.type(option)
.get('.fast-option')
.contains(re)
.click()
import React from 'react';
const SettingsGearIcon = () => {
return (
<svg
width='23'
height='24'
viewBox='0 0 60 64'
>
<path