Skip to content

Instantly share code, notes, and snippets.

View jsmayo's full-sized avatar
👨‍💻

Jesse jsmayo

👨‍💻
View GitHub Profile
@jsmayo
jsmayo / index.html
Created April 20, 2023 22:26
Pure CSS cat animation
<div class="cat">
<div class="ear ear--left"></div>
<div class="ear ear--right"></div>
<div class="face">
<div class="eye eye--left">
<div class="eye-pupil"></div>
</div>
<div class="eye eye--right">
<div class="eye-pupil"></div>
</div>
@jkmartindale
jkmartindale / awa-twitch.js
Last active April 24, 2024 22:13
Paste this into your browser console to hopefully start earning rewards. Forum thread: https://web.archive.org/web/20230922092451/https%3A%2F%2Fna.alienwarearena.com%2Fucf%2Fshow%2F2167631
/* Twitch Quest Fixer v3.1 */
const extensionID = "ehc5ey5g9hoehi8ys54lr6eknomqgr";
const channel = location.pathname.slice(1).toLowerCase();
const channelId = __APOLLO_CLIENT__.cache.data.data.ROOT_QUERY["channel({\"name\":\""+channel+"\"})"].__ref.split(":")[1];
const pollDuration = 60000;
let authToken = __APOLLO_CLIENT__.cache.data.data["Channel:" + channelId].selfInstalledExtensions.filter(x => x.helixToken.extensionID == extensionID)[0].token.jwt;
grantPermission = async () => {
console.log("Attempting to grant permission automatically...");
const integrityResponse = await (await fetch("https://gql.twitch.tv/integrity", { method: "post", headers: commonOptions.headers })).json();
@jsmayo
jsmayo / css-filter-generator-to-convert-from-black-to-target-hex-color.markdown
Created November 1, 2019 04:51
CSS filter generator to convert from black to target hex color
@jsmayo
jsmayo / angularjs-form-validation.markdown
Created June 19, 2019 01:48
AngularJS Form Validation
@jsmayo
jsmayo / 90-s-cursor-fairy-dust.markdown
Created April 1, 2019 07:01
90's cursor fairy dust

90's cursor fairy dust

1/x of a series of cursor effects, because they're awesome. Thats why.

A Pen by Steven on CodePen.

License.

@jsmayo
jsmayo / getShortDate.scpt
Created November 13, 2018 18:40
Outputs the short date via keyboard shortcut in MacOS
on run
# TODAY - Returns today's date!
# Create your own Service, to avoid 3rd Party software (WordService, etc.)
# In Automator:
# > Service receives 'no input' in 'any application'
# > Output replaces selected text
# Add Shortcut (e.g. Ctrl+Cmd+T - it's hard to find a free shortcut!):
# > Preferences > Keyboard > Keyboard Shortcuts > Services
# When setting up Keyboard Shortcut, *exit* the target app before testing. (It seems shortcuts are only refreshed when app is launched)
# Adjust 'Short' Date format
@thisnameissoclever
thisnameissoclever / JournalRedactor.js
Last active April 6, 2024 08:28
Redact or delete a given journal entry in ServiceNow. Usage documentation: http://redactor.snc.guru/
/*
Script Include definition:
Name: JournalRedactor
Client Callable: false
Accessible from: All application scopes
Additional details:
Version: 1.3
Usage documentation: http://redactor.snc.guru/
License: https://gist.github.com/thisnameissoclever/767b8a738b929a0bd943965431061c1e
*/
@jacebenson
jacebenson / pandoc-build.js
Last active November 26, 2018 16:41
Output pandoc command
// just run node pandoc-build.js > output.txt
// that will write the contents of this there
// and then just copy paste that command and
// you should get a good epub.
// I always had to cd to the root of the posts
// directory to run the command.
var fs = require('fs');
var path = require('path');
var output = [
"pandoc -o _book.epub \\\n",
@jsmayo
jsmayo / closureExercise.js
Last active February 24, 2018 08:50
Closure Exercise created by jsmayo - https://repl.it/@jsmayo/Closure-Exercise
/*
Write a function called specialMultiply which accepts two parameters. If the function is passed both parameters, it should return the product of the two. If the function is only passed one parameter - it should return a function which can later be passed another parameter to return the product. You will have to use closure and arguments to solve this.
Examples:
specialMultiply(3,4); // 12
specialMultiply(3)(4); // 12
specialMultiply(3); // function(){}....
*/
const copyToClipboard = str => {
const el = document.createElement('textarea'); // Create a <textarea> element
el.value = str; // Set its value to the string that you want copied
el.setAttribute('readonly', ''); // Make it readonly to be tamper-proof
el.style.position = 'absolute';
el.style.left = '-9999px'; // Move outside the screen to make it invisible
document.body.appendChild(el); // Append the <textarea> element to the HTML document
const selected =
document.getSelection().rangeCount > 0 // Check if there is any content selected previously
? document.getSelection().getRangeAt(0) // Store selection if found