Skip to content

Instantly share code, notes, and snippets.

@joemay
joemay / gist:5110152
Last active December 14, 2015 15:48 — forked from JeffreyWay/gist:5105516
Sublime Style Editor
data:text/html, <style type="text/css">#e{position:absolute;top:0;right:0;bottom:0;left:0;font-size:16px}</style><div id="e"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("e");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/php");</script>
<?php
/**
* Simple wrapper around the
* PHPUnit assertion library.
*
* Assert::equals(21, $age);
* Assert::greaterThan(20, $age);
* Assert::has('Joe', ['John', 'Joe']);
*/
@joemay
joemay / gist:5229334
Created March 23, 2013 21:00 — forked from anonymous/gist:2871087
Terminal aliases
set -o vi
# Aliases
alias sites="cd ~/Sites/"
alias desk="cd ~/Desktop/"
alias ..="cd ../"
alias ...="cd ../../"
alias server='open http://localhost:8000 && python -m SimpleHTTPServer'
alias restartApache="sudo apachectl restart"
alias plugins="cd ~/.vim/bundle"
@joemay
joemay / less_than_ie_10.html
Created April 7, 2013 01:36
Conditional HTML class less than IE 10
<!--[if lt IE 7 ]> <html class="ie6 lt-ie10 lt-ie9 lt-ie8 lt-ie7"> <![endif]--> <!--[if IE 7 ]> <html class="ie7 lt-ie10 lt-ie9 lt-ie8"> <![endif]--> <!--[if IE 8 ]> <html class="ie8 lt-ie10 lt-ie9"> <![endif]--> <!--[if IE 9 ]> <html class="ie9 lt-ie10"> <![endif]--> <!--[if (gt IE 9)|!(IE)]><!--> <html class=""> <!--<![endif]-->
@mixin category-colors($after: false)
@each $category in $categories
@if $after == true
.cat-#{nth($category, 1)}:after
background-color: nth($category, 2)
@else
.cat-#{nth($category, 1)}
background-color: nth($category, 2)
property baseURL : "http://statusboard.dev/song?"
if application "Spotify" is running then
tell application "Spotify"
set theTrack to name of the current track
set theArtist to artist of the current track
set theAlbum to album of the current track
set theurl to spotify url of the current track
try
do shell script "/usr/local/bin/wget --delete-after \"" & baseURL & "&t=" & theTrack & "&a=" & theArtist & "&al=" & theAlbum & "\""
//*
someCode();
/*/
someOtherCode();
//*/
@joemay
joemay / align-helper.js
Created March 18, 2014 21:48
Alignment helper rectangle
$.getScript('http://cdnjs.cloudflare.com/ajax/libs/jquery.pep/0.4.0/jquery.pep.min.js', function() {
var attributes = {
'id': 'com-may-align-helper',
'text': ''
};
var properties = {
'width': 100,
'height': 100,
'display': 'block',
tell application "Messages"
log in service "<work-account1>"
log in service "<work-account2>"
end tell
tell application "Mail"
set enabled of account "<work-account>" to true
end tell
tell application "OmniFocus"
tell application "Messages"
log out service "<work-account1>"
log out service "<work-account2>"
end tell
tell application "Mail"
set enabled of account "<work-account>" to false
end tell
tell application "OmniFocus"