Skip to content

Instantly share code, notes, and snippets.

View kamry-bowman's full-sized avatar

Kamry Bowman kamry-bowman

View GitHub Profile
@kamry-bowman
kamry-bowman / updater.js
Created May 17, 2020 21:08
Toggle Netflix Subs Greasemonkey
// ==UserScript==
// @name Toggle Netflix Subs
// @version 1
// @grant none
// @match https://www.netflix.com/*
// ==/UserScript==
let subSpanishButton = document.querySelector(
"[data-uia='track-subtitle-European Spanish']"
);
%reset-Button {
border: none;
margin: 0;
padding: 0;
width: auto;
overflow: visible;
background: transparent;
/* inherit font & color from ancestor */
function arrayToList(arr) {
let list = {}
let pointer = list;
let end = arr.length - 1;
for (let i = 0; i < end; i++) {
let current = arr[i];
pointer.value = current;
pointer.rest = {};
pointer = pointer.rest;
@kamry-bowman
kamry-bowman / gh-pages-deploy.md
Created October 9, 2018 04:20 — forked from cobyism/gh-pages-deploy.md
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).

@kamry-bowman
kamry-bowman / gist:95280a83e3be64cf9e389661f18d4f64
Last active February 8, 2019 05:19 — forked from patlecat/gist:59f8372248f599c2ef7009a457819862
How to correctly resize a GIF with GraphicsMagick >1.3.18
## Commandline for GM, a GIF resize in 3 steps
# Analyze the GIF frames
gm identify -format "File_size: %b, Unique_colors: %k, Bit_depth: %q, Orig Dimensions: %hx%wpx\n" original.gif
# Apply a coalesce with correct colors and depth (from identify) and no dither (has to come in front to work)
gm convert original.gif +dither -depth 8 -modulate 100,0 -coalesce gm_resize_new_big.gif
# Okay resize now and make sure it won't try to dither again!
gm convert gm_resize_new_big.gif +dither -resize 100x100 gm_resize_new_small.gif