Skip to content

Instantly share code, notes, and snippets.

View caycefischer's full-sized avatar

Cayce caycefischer

  • Toronto
View GitHub Profile
@caycefischer
caycefischer / hack.sh
Last active September 20, 2023 16:41 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2279031/hack.sh | sh
#
@caycefischer
caycefischer / jekyllSyntaxHighlighting.md
Created July 30, 2012 02:19
Various Methods of Syntax Highlighting w/ Jekyll

1. Highlighting the Jekyll way.

This method uses Liquid tags and works when published to Github Pages. It doesn't work in Github's viewer when browsing the repo.

{{ "{% highlight html linenos "}}%}
<div>this is some preformatted code</div>
{{ "{% endhighlight "}}%}

2. Highlighting the Markdown way

@caycefischer
caycefischer / webdev-candyland.md
Last active July 26, 2020 04:23
setting up my web development environment on Mountain Lion

Setting up Mac OSX Lion for Web Development

These are the steps I take to set up a new install of OSX Mountain Lion for web development.


1. Tweak some OS X "hacker defaults"

Run my fork of Mathias Bynens' legendary script:

// 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 / lemonPoppyseedMuffins.md
Created September 7, 2012 00:02
Lemon-Poppyseed Muffins

Lemon Poppy-seed Muffins

  • 2 eggs
  • ¼ cup canola oil + ½ cup plain yogourt (can substitute with ¾ cup canola oil)
  • ¾ cup milk
  • ½ tsp vanilla
  • ¼ cup poppy seeds

Combine all that in one bowl, then in another bowl mix the following:

@caycefischer
caycefischer / iOS-webapp.html
Created March 14, 2012 01:20
iOS web app <head> tags
<!-- http://davidwalsh.name/hide-address-bar -->
<!-- iOS web app, deletable if not needed -->
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<!-- Prevent links in standalone web apps opening Mobile Safari. https://gist.github.com/1042026 -->
<script>(function(a,b,c){if(c in b&&b[c]){var d,e=a.location,f=/^(a|html)$/i;a.addEventListener("click",function(a){d=a.target;while(!f.test(d.nodeName))d=d.parentNode;"href"in d&&(d.href.indexOf("http")||~d.href.indexOf(e.host))&&(a.preventDefault(),e.href=d.href)},!1)}})(document,window.navigator,"standalone")</script>
<!-- iOS startup images: http://miniapps.co.uk/blog/post/ios-startup-images-using-css-media-queries -->
@caycefischer
caycefischer / apacheSetup
Created July 26, 2012 07:53
Apache Setup (Mountain Lion)
# a script following this guide:
# http://coolestguyplanettech.com/downtown/install-and-configure-apache-mysql-php-and-phpmyadmin-osx-108-mountain-lion
# for enabling apache on OS X Mountain Lion
# ---
#start up apache
sudo apachectl start
# create ~/Sites
@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';