Skip to content

Instantly share code, notes, and snippets.

View choppingblock's full-sized avatar

Matthew Richmond choppingblock

View GitHub Profile
<?php switch($this->template): case "title": ?>
<!-- html -->
<?php break;?>
<?php case is_null(): ?>
<?php default: ?>
<!-- html -->
<?php break;?>
@choppingblock
choppingblock / Show Boolean
Created November 3, 2013 04:27
Trace/show Boolean value.
<?php
$boolarray = Array(false => 'false', true => 'true');
echo $boolarray[isLocal()];
?>
Responsive Design Resources
===========================
What is responsive design?
--------------------------
@choppingblock
choppingblock / Maintenance Routine for Mac OS X
Last active December 25, 2015 12:39
Mac, OS X, maintenance, cocktail, troubleshoot, cache
Maintenance Routine for Mac OS X
===============================
Every week:
- Run cocktail http://www.maintain.se/cocktail
- pilot mode, turn on all the options.
- browsers, turn em all on.
- Make sure tiy are clearing font & printing caches.
- Restart
@choppingblock
choppingblock / Create Directories via Text File
Created October 10, 2013 03:43
Create directories/folders from the contents of a txt file in Unix Terminal
$ cat folders.txt | xargs mkdir
@choppingblock
choppingblock / Calculate Angle Along Quadratic Bezier
Created September 14, 2013 02:38
Have a quadratic bezier curve, need to figure out an angle along the way. This should work quite well, easy to convert to JavaScript.
public static function quadraticBezierAngle(value:Number, anchor1:Point, anchor2:Point, control:Point):Number {
var uc:Number = 1 - value;
var dx:Number = (uc * control.x + value * anchor2.x) - (uc * anchor1.x + value * control.x);
var dy:Number = (uc * control.y + value * anchor2.y) - (uc * anchor1.y + value * control.y);
return Math.atan2(dy, dx);
}
@choppingblock
choppingblock / gist:5560142
Created May 11, 2013 14:42
Domain Registrars
; Network Solutions (http://networksolutions.com)
: Old, good, reliable and expensive. Call the Gold VIP customer line (866 791.9411) and tell them you only want to pay $8 a year per domain.
; GoDaddy (http://godaddy.com)
: Also good, and inexpensive. Be careful of searching for good domains, they seem to disappear.
; Directnic (http://directnic.com)
: Also inexpensive, with really nice search tools
; Dotster (http://www.dotster.com)
@choppingblock
choppingblock / TextMate Support File Install
Created February 27, 2013 16:17
Installing Matthew's TextMate Support files.
Installing Matthew's TextMate Bundle
1. Install TextMate <http://macromates.com>
2. If you opened it: Close TextMate
3. Locate the "Application Support" folder
- [hard drive]:Users:[username]:Library:Application Support
- if you need help getting to the Library folder, hit Shift-Command-G and enter "~/Library"
4. Download Matthew's TextMate Support Directory: http://assets.choppingblock.com.s3.amazonaws.com/classfiles/TextMate_20130204.zip
5. Unzip the TextMate.zip file downloaded above and place the uncompressed "TextMate" folder into your "Application Support" folder.
6. If you already have a TextMate folder there, replace it.
7. Open TextMate, you should now have the "HTML Chop" bundle installed. You can fid it at: File > New From Template > HTML Chop