Skip to content

Instantly share code, notes, and snippets.

View AugustMiller's full-sized avatar
🌳

August Miller AugustMiller

🌳
View GitHub Profile
@nrabinowitz
nrabinowitz / quantize.js
Created July 25, 2011 17:19
Javascript module for color quantization, based on Leptonica
/*!
* quantize.js Copyright 2008 Nick Rabinowitz.
* Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
*/
// fill out a couple protovis dependencies
/*!
* Block below copied from Protovis: http://mbostock.github.com/protovis/
* Copyright 2010 Stanford Visualization Group
* Licensed under the BSD License: http://www.opensource.org/licenses/bsd-license.php
@conorbuck
conorbuck / angle-between-points.js
Created May 5, 2012 22:51
JavaScript: Find the angle between two points
var p1 = {
x: 20,
y: 20
};
var p2 = {
x: 40,
y: 40
};
@arlodesign
arlodesign / Pixel Zoom.jsx
Last active November 27, 2021 09:42
100% Pixel-for-Pixel Zoom when designing for web/mobile/tablet in InDesign
// Run this script when using InDesign for web/mobile/tablet comps
// Calculates zoom based on 72ppi, so 100% shows pixel-perfect sizing
app.generalPreferences.customMonitorPpi = 72;
app.generalPreferences.useCustomMonitorResolution = true;
@markhuot
markhuot / gist:9398909
Last active September 29, 2022 17:51
Enhanced Markdown

The following is an idea for an enhancement to Markdown that allows for "YAML frontmatter" intersperced throughout the document. This will allow you to write standard markdown while also supporting more complex data types where necessary.

The idea incldues the ability to "class" your YAML to a specific object type. For example, what follows is an image object that would be rendered according to the specs of the rendering engine.

----image
src: /path/to/image.png
caption: some markdown [caption](#)
credit: a person's name
----
@eaton
eaton / Craft CMS
Created July 16, 2014 20:19
CMS test run vagrantfiles
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Setting up Craft CMS:
# 0. vagrant-up
# 1. Download the latest from http://buildwithcraft.com
# 2. Uncompress the Craft zip.
# 3. Copy its 'public' and 'craft' directories into the 'www' folder.
# 4. Rename www/public/htaccess to www/public/.htaccess
@bastianallgeier
bastianallgeier / nginx
Last active November 30, 2023 10:14
nginx setup
# block content
location ~ ^/content/(.*).(txt|md|mdown)$ {
rewrite ^/content/(.*).(txt|md|mdown)$ /error redirect;
}
# block all files in the site folder from being accessed directly
location ~ ^/site/(.*)$ {
rewrite ^/site/(.*)$ /error redirect;
}
git submodule add https://github.com/getkirby/kirby.git
git submodule add https://github.com/getkirby/panel.git
git submodule update --init --recursive
@watson
watson / airplay.md
Last active February 5, 2022 03:41
An overview over my AirPlay related modules
@erikcox
erikcox / SimCityLoadingMessages.txt
Created November 11, 2015 21:23
A list of loading messages from the game SimCity, which I repurposed for Slack loading messages.
Adding Hidden Agendas
Adjusting Bell Curves
Aesthesizing Industrial Areas
Aligning Covariance Matrices
Applying Feng Shui Shaders
Applying Theatre Soda Layer
Asserting Packed Exemplars
Attempting to Lock Back-Buffer
Binding Sapling Root System
Breeding Fauna
@khalwat
khalwat / set-project-perms.sh
Last active January 1, 2020 01:10
Properly set permissions for a Craft CMS install, including ensuring that files are all g-x. Set CHOWN_USER, CHOWN_GROUP, and BASE_DIR to whatever is appropriate, add directories that need to be writeable by the web server to DIRS[], then execute: sudo ./set-project-perms.sh PROJECT_NAME
This is now part of craft-scripts:
https://github.com/nystudio107/craft-scripts