Skip to content

Instantly share code, notes, and snippets.

View caycefischer's full-sized avatar

Cayce caycefischer

  • Toronto
View GitHub Profile
// https://en.wikipedia.org/wiki/Alpha_scale
// http://www.microtonal-synthesis.com/scale_carlos_alpha.html
var notes = [
// the Alpha scale is generated by dividing a perfect fifth into 9 steps
// with a root of A4 (440hz), a perfect fifth is E4 (659.25hz)
// to get a single step in the Alpha scale, we perform (659.25-440)/9 = 24.36hz
// a major third in the alpha scale is 5 steps: 24.36*5 = 121.8hz
// in this way, we can take any ROOT note in hertz and derive an Alpha scale from it
@caycefischer
caycefischer / copyeditor.js
Created July 13, 2019 02:11
Sketch.app Copyeditor Plugin
// repo here: https://github.com/caycefischer/sketch-copyeditor
var com = {};
com.updatecopy = {
debugLog: function(msg) {
if(this.debug) log(msg);
},
@caycefischer
caycefischer / icons.html
Created June 12, 2013 20:32
A Unified Field Theory of “fav”, “touch” and “tile” icons.
<!-- as per Mathias Bynens: http://mathiasbynens.be/notes/touch-icons#sizes -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/apple-touch-icon-144x144-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="120x120" href="/apple-touch-icon-120x120-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="/apple-touch-icon-114x114-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="/apple-touch-icon-72x72-precomposed.png">
<link rel="apple-touch-icon-precomposed" href="/apple-touch-icon-precomposed.png"> <!-- this is 57x57 -->
<!-- as per Jonathan Neal: http://www.jonathantneal.com/blog/understand-the-favicon/ -->
<link rel="icon" href="/favicon.png">
<!--[if IE]><link rel="shortcut icon" href="/favicon.ico"><![endif]-->
// '$' helper function
window.$ = function(selector) {
return document.querySelector(selector);
};
// usage
$('#nic').src = 'http://placecage.com/c/400/300';
<style>
@media (min-width: 45em) {
body:after {
content: 'widescreen';
display: none;
}
}
</style>
<script>
@caycefischer
caycefischer / .htaccess
Created February 18, 2013 09:40
.htaccess shenanigans
# redirect www to no-www
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^www.domain.com [NC]
RewriteRule ^(.*)$ http://domain.com/$1 [L,R=301]
# custom error pages
ErrorDocument 401 /error/401.php
ErrorDocument 403 /error/403.php
ErrorDocument 404 /error/404.php
@caycefischer
caycefischer / markdownify.html
Created February 12, 2013 04:47
Get Jekyll to parse markdown inside .html files
{% capture md %}
# {{page.title}}
> blockquote
Hello!
{% endcapture %}
{{ md | markdownify }}
Single line, no attribution:
<figure class="quote">
<blockquote>It is the unofficial force—the Baker Street irregulars.</blockquote>
</figure>
Single line, with attribution and optional cite:
<figure class="quote">
<blockquote>It is the unofficial force—the Baker Street irregulars.</blockquote>
@caycefischer
caycefischer / index.html
Created November 2, 2012 03:16
A CodePen by Zak Kain. More Responsive Grid Systems - by @zakkain, forked from the ever-clever @chriscoyier's "Don't Overthink it Grid". Read my blog post here: http://amperedesign.com/blog/more-responsive-grid-systems/
<h1>
A More Responsive Grid System
<em>based off of the Don't Overthink it Grid</em>
</h1>
<h2><a href="http://amperedesign.com/blog/more-responsive-grid-systems/">Read the full article here</a></h2>
<!-- let the show begin -->
<div class="grid grid-pad">
@caycefischer
caycefischer / html5.haml
Created October 12, 2012 06:02 — forked from fnhipster/html5.haml
HTML5 HAML Template
!!! 5
%html
%head
%title= "Your Website"
%meta{ :content => "", :name => "description" }
%meta{ :content => "", :name => "author" }
%meta{ :content => "3 days", :name => "revisit-after" }
%link{ :href => "http://creativecommons.org/licenses/by/3.0/", :rel => "license", :title => "Creative Commons Attribution 3.0 Unported License" }
%link{ :href => "/feed", :rel => "alternate", :title => "Atom", :type => "application/atom+xml" }
%link{ :href => "/css/screen.css", :media => "screen", :rel => "stylesheet" }