This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Module = (function(){ | |
this.myMethod = function(x) { | |
return x | |
}; | |
return this; | |
})(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sublime, sublime_plugin, subprocess | |
class DocsendCommand(sublime_plugin.TextCommand): | |
def run(self, edit): | |
script = """ | |
on run | |
ignoring application responses | |
tell application "Transmit" | |
open POSIX file "%s" | |
end tell |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var isItScrollableWithoutVisibleScrollbars = function(el) { | |
return (el && (el.scrollHeight > el.offsetHeight) && !(el.offsetWidth > el.scrollWidth)); | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$builder = new Builder('Page', array( | |
'name' => 'asc' | |
)); | |
$builder->register('buildActive', function(&$where) { | |
$where['status='] = 'active'; | |
}); | |
$builder->extend('buildActive', 'buildActivePublished', function(&$where) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# osx copy/paste | |
set-option -g default-command "reattach-to-user-namespace -l bash" | |
# 256 colors | |
set -g default-terminal "xterm-256color" | |
# history | |
set -g history-limit 20000 | |
# set vi keys |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* A class to help with adding build methods | |
* to your fActiveRecord models. | |
* | |
* @author Jeff Turcotte <[email protected]> | |
* @license MIT | |
* @version 1.0 | |
* | |
* Usage: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*! Cycle2 lookahead plugin for backgrounds | |
* Copyright (c) 2013 M. Alsup; Dual licensed: MIT/GPL | |
* @author Jeff Turcotte <[email protected]> | |
*/ | |
(function($) { | |
"use strict"; | |
$(document).on( 'cycle-initialized', function(e, opts) { | |
var key = 'cycle-look-ahead'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#logo { | |
background-image: url('/images/my_image.png'); | |
} | |
@media all and (-webkit-min-device-pixel-ratio: 1.5) { | |
#logo { | |
background-image: url('/images/[email protected]'); | |
background-size: 200px 100px; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<title>{{ title|title }}</title> | |
<link rel="stylesheet" href="/styles/common.css" /> | |
<link rel="stylesheet" href="/styles/layout.css" /> | |
</head> | |
<body> | |
{{ include('header.html') }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Register a dependency. The following formats are allowed: | |
* | |
* 1. Fully qualified class (or interface) name with factory closure: | |
* $injector->register('Fully\Qualified\ClassName', function { .... }); | |
* | |
* 2. Fully qualified class (or interface) name with instance of said class: | |
* $injector->register('Fully\Qualified\ClassName', $instance); | |
* |
OlderNewer