Skip to content

Instantly share code, notes, and snippets.

@jdeagle
jdeagle / LazySusan.as
Created July 16, 2012 23:13 — forked from rynbyjn/LazySusan.as
AS3 LazySusan/Carousel class for moving objects around a circle with pseudo 3D
package com.boyajian.ui
{
import com.greensock.TweenLite;
import flash.display.DisplayObject;
import flash.display.DisplayObjectContainer;
import flash.display.Sprite;
import flash.display.Stage;
import flash.events.Event;
@jdeagle
jdeagle / gist:3179261
Created July 25, 2012 23:07 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@jdeagle
jdeagle / gist:3734855
Created September 16, 2012 23:47 — forked from doctyper/gist:3718320
Uninstall all NPM modules
npm list -g | awk '/@/ {print $2}' | grep '@' | awk -F@ '{print $1}' | xargs npm -g uninstall
@jdeagle
jdeagle / % Shortcut to Placeholder.tmSnippet
Created October 26, 2012 18:25 — forked from doctyper/% Shortcut to Placeholder.tmSnippet
Placeholder Shortcut for Sublime Text 2 / TextMate
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>content</key>
<string>@extend %$0;</string>
<key>name</key>
<string>% Shortcut to Placeholder</string>
<key>scope</key>
<string>source.scss</string>
@jdeagle
jdeagle / gist:4003501
Created November 2, 2012 18:46 — forked from doctyper/gist:1644192
Just some animation SCSS mixins.
@mixin animation($animation, $animation-2: none, $animation-3: none) {
@each $prefix in webkit, moz, ms {
#{""}-#{$prefix}-animation: $animation, $animation-2, $animation-3;
}
}
@mixin animation-name($name) {
@include experimental(animation-name, $name);
}
@jdeagle
jdeagle / ios-test.css
Created November 6, 2012 19:43 — forked from mattyoho/ios-test.css
iOS Media Queries
// iOS Media Queries
// Goal: capture styles for iPhone, iPhone 3G, iPhone 3GS, iPhone 4, iPhone 4S, iPad, and iPad 2
//
// Author: Tony Schneider (@tonywok)
// Please tell me where I fail. :)
// iPhone v(4,4S) portrait
// test: black text (overwritten by v* portrait) with blue background
@media all and (-webkit-min-device-pixel-ratio: 2) and (orientation: portrait) {
a {
function pretty_number(num, opts)
{
var defaultOpts = {
short: true,
lowerCase: false,
addCommas: true,
round: 2
};
if (typeof num != "number")
@jdeagle
jdeagle / popup.txt
Created August 27, 2013 18:28 — forked from timrwood/popup.txt
javascript:!function(){var h=location.href,y=h.match(/(youtu.be\/|v\/|u\/\w\/|embed\/|v=)([^#\&\? ]*).*/),v=h.match(/(vimeo.com\/)([^#\&\? ]*)/);y=y&&'http://www.youtube.com/watch_popup/?v='+y[2];v=v&&'http://player.vimeo.com/video/'+v[2];window.open(y||v,"_blank","height=345,width=560");}()
@function em($target, $context: $base-font-size) {
@if $target == 0 { @return 0 }
@return $target / $context + 0em;
}
$base-font-size: 15px;
h1 {
font-size: em(21px, 15px); // Outputs 1.4em
}

##Create an alias to MAMP's PHP installation

To do this, we can simply create an alias for our bash profile. We'll be doing this is nano, though you can do it in vim or a number of other editors as well.

Within the terminal, run:

nano ~/.bash_profile

This will open nano with the contents, at the top in a blank line add the following line: