Skip to content

Instantly share code, notes, and snippets.

View tcd's full-sized avatar
📜
Edit status

Clay Dunston tcd

📜
Edit status
  • Birmingham, AL
View GitHub Profile
@tcd
tcd / input.scss
Created July 8, 2022 22:42
Generated by SassMeister.com.
@use "sass:selector";
.er__weaponDetail {
$weapon-detail-weapon-image-size: 155px;
.er__weaponDetail__imageColumn {
display: flex;
flex-direction: row;
flex-wrap: nowrap;
align-items: flex-end;
@tcd
tcd / npm-do.ps1
Last active June 20, 2022 15:28
call locally installed npm binary from powershell
function npm_do {
if ($args.Count -lt 1) {
throw "At least one argument is required"
}
$npmBinFolder = $(npm bin)
$exePath = -join($npmBinFolder, "\", $args[0], ".ps1")
if ($args.Count -eq 1) {
. $exePath
} else {
$exeArgs = $args[1..($args.length - 1)]
@tcd
tcd / funx.html
Created June 9, 2022 02:08
Google sheets functions
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
@tcd
tcd / swagger.json
Created June 8, 2022 18:05
JSON Placeholder Swagger
{"swagger":"2.0","info":{"description":"Fake Online REST API for Testing and Prototyping","version":"1.0.0","title":"JSON Placeholder"},"host":"jsonplaceholder.typicode.com","tags":[{"name":"posts"},{"name":"comments"},{"name":"albums"},{"name":"photos"},{"name":"todos"},{"name":"users"}],"schemes":["https"],"paths":{"/posts":{"get":{"tags":["posts"],"operationId":"getPosts","summary":"Get all available posts","parameters":[{"name":"userId","in":"query","type":"integer","description":"Filter by user ID","required":true}],"produces":["application/json"],"responses":{"200":{"description":"successful operation","schema":{"type":"array","items":{"$ref":"#/definitions/Post"}}}}}},"/posts/{id}":{"get":{"tags":["posts"],"summary":"Get specific post","parameters":[{"name":"id","in":"path","description":"The ID of the post to retrieve","required":true,"type":"integer"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/Post"}},"404":{"description":"not found","schema":{"$ref":"#/
@tcd
tcd / clear-watch-later.js
Last active May 22, 2022 18:34
Clear videos from a YouTube playlist
/**
* YouTube has no way for you to clear your [Watch later playlist](https://www.youtube.com/playlist?list=WL).
*
* So I made this.
*/
(async () => {
await import("https://code.jquery.com/jquery-2.2.4.min.js");
/** Total videos removed */
let videosRemoved = 0;
/** Time between interacting with HTML elements */