Skip to content

Instantly share code, notes, and snippets.

View loadedsith's full-sized avatar

Graham P Heath loadedsith

View GitHub Profile
@loadedsith
loadedsith / input.scss
Last active October 26, 2022 16:24
Generated by SassMeister.com.
.pulse-fade {
animation-name: pulse;
animation-duration: 2s;
animation-timing-function: ease-in-out;
animation-iteration-count: infinite;
animation-direction: alternate;
}
.pulse-fade-2 {animation-delay: -0.75s;}
.pulse-fade-3 {animation-delay: -0.5s;}
@loadedsith
loadedsith / input.scss
Created October 26, 2022 15:33
Generated by SassMeister.com.
.pulse-fade {
animation-name: pulse;
animation-duration: 2s;
animation-timing-function: ease-in-out;
animation-iteration-count: infinite;
}
.pulse-fade-1 {animation-delay: 0.25s;}
.pulse-fade-2 {animation-delay: 0.5s;}
.pulse-fade-3 {animation-delay: 0.75s;}
@loadedsith
loadedsith / readme.md
Last active January 8, 2021 17:45
Save as JPG workflow instructions

I've been encountering more and more .heic and .webp files lately. It's great, these formats have significant advantages... And yet, some times you just want a JPG. I've come up with a pretty good solve. It presumes that you have imageMagick installed.

  1. Open Automator.app
  2. Choose to make a new "Quick Action"
  3. Workflow receives current "Image files" in "Finder.app"
  4. Add an action called "Run Shell Script"
  5. Configure action: Shell: /bin/bash, Pass input "as arguments"
  6. Paste this script
 for f in "$@"
@loadedsith
loadedsith / keymap.c
Last active November 10, 2020 18:24
Backlight responds to layers
bool has_layer_changed = true;
void matrix_scan_user(void) {
uint8_t layer = biton32(layer_state);
static uint8_t old_layer = 0;
if (old_layer != layer) {
has_layer_changed = true;
old_layer = layer;
}
@loadedsith
loadedsith / input.scss
Created October 9, 2020 19:26
Generated by SassMeister.com.
.bz{
@media (min-width: 500px) {
padding-bottom: 100px;
padding-top: 85px;
}
padding-bottom: 60px;
padding-top: 70px;
}
@loadedsith
loadedsith / input.scss
Created September 16, 2020 18:45
Generated by SassMeister.com.
.foo {
.bar {
content: "a";
}
&.bar {
content: "b";
}
& .bar {
content: "c";
}
Kaveri Ra was separated from her family at a young age. Having lived a nomadic lifestyle until that time, moving constantly from planet to plnet, she continued in that vein after her parents vanished.
She had been serving as a wilderness guide and hunter throughout out the Outerr Rim for most of her life, when she met Hethan Romund on an expedition to a ruin on an otherwise deserted world. Over the course of that expedition Romund was curious about Kaveri's uncanny knack for spotting trouble before it happened and understanding the local wildlife, even though she'd never vistied the planet before.
Ultimately, Romund revealed the truth: Kaveri was sensitive to the Force. and her usual abilities were only the least of what she could accomplish. Romund insisted that she was capable of much more -- but that Romund herself could not teach her.
@loadedsith
loadedsith / gist:7d75f7929295aaeb9574f9f36d78ea80
Created August 14, 2019 16:12
chunkwm send window to next display, wrapped
id=$(chunkc tiling::query --monitor id);
count=$(chunkc tiling::query --monitor count);
next=$(expr $id % $count + 1)
chunkc tiling::window --send-to-monitor $next;
chunkc tiling::monitor -f $next
@loadedsith
loadedsith / scrollByAnimated.js
Last active June 13, 2019 17:28
scrollByAnimated(scrollY) Pure javascript
scrollByAnimated = function(scrollY, duration){
var startTime = new Date().getTime();
var startY = window.scrollY;
var endY = startY + scrollY;
var currentY = startY;
var directionY = scrollY > 0 ? 'down' : 'up';
var animationComplete;
var count = 0;
#!/usr/bin/env bash
[[ -f "${TM_SUPPORT_PATH}/lib/bash_init.sh" ]] && . "${TM_SUPPORT_PATH}/lib/bash_init.sh"
if [ -z ${TM_PROJECT_DIRECTORY+x} ]; then
echo -n "$TM_FILEPATH" | pbcopy
echo "$TM_FILEPATH"'\n Absolute path copied to clipboard'
else
TM_PROJECT_DIRECTORY="$TM_PROJECT_DIRECTORY/"
echo -n "${TM_FILEPATH#$TM_PROJECT_DIRECTORY}" | pbcopy