Skip to content

Instantly share code, notes, and snippets.

View kamry-bowman's full-sized avatar

Kamry Bowman kamry-bowman

View GitHub Profile
@patlecat
patlecat / gist:59f8372248f599c2ef7009a457819862
Created June 13, 2016 12:19
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 -colors 135 -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
@cobyism
cobyism / gh-pages-deploy.md
Last active October 31, 2025 17:43
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).