This file contains 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 | |
/** | |
* PluginRoute class. | |
* | |
* Route class for plugins that allows you to clean up urls for plugins | |
* without tons of calls to Router::connect() to shorten controller names in urls. | |
*/ | |
class PluginRoute extends CakeRoute | |
{ |
This file contains 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 PUBLIC "-//W3C//DTD HTML 4.01//EN"> | |
<html> | |
<head> | |
{{ html.charset() }} | |
<title>{{ 'CakePHP: the rapid development php framework'|trans }}: {{ title_for_layout }}</title> | |
{{ html.meta('icon') }} | |
{{ html.css('cake.generic') }} | |
{{ scripts_for_layout }} | |
</head> | |
<body> |
This file contains 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
doctrine_user.config: | |
db_driver: odm | |
class: | |
model: | |
user: Bundle\ExerciseUserBundle\Document\User | |
group: ~ | |
permission: ~ | |
form: | |
user: ~ | |
group: ~ |
This file contains 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
/* | |
* Use the following in the "resultFilters" option when creating a YUI 3 Autocomplete | |
* widget. This will return matches when *any* of the words in the query string match. | |
* This is opposed to the default "wordMatch", which matches *all* words in the | |
* query string. | |
*/ | |
function matchAnyWord(query, results) { | |
var WordBreak = Y.Text.WorkBreak, |
Looking at the ES5 compatibility table, several browsers provide everything often used (i. e. not Object.freeze() and friends) except Function.prototype.bind
. So I just inline that. Browsers that don't provide other functions also don't include Object.getOwnPropertyNames, so I used it as my test for including the entire shim.
Note that I haven't tested it yet, and it doesn't work for the six Object functions next to each other in the Safari 5 part of the compatibility chart (Safari 5 is deemed good enough).
Update: I added JSON for IE <= 7. JSON is used in a good number of node.js modules.
This file contains 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
TM_GIT = "/usr/local/bin/git" | |
windowTitle = '$TM_FILEPATH' | |
fontName = "Anonymous Pro" | |
fontSize = 14 | |
# Extra files to include | |
myExtraIncludes = ".tm_properties,.htaccess,.gitignore" | |
fileBrowserGlob = "{*,$myExtraIncludes}" |
This file contains 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
#!/usr/bin/env node | |
var Y = require('yui/io-base'), | |
//API call to gallery's API | |
url = 'http://yuilibrary.com/gallery/api/all', | |
//What module should we resolve? | |
mod = process.argv[2] || 'gallery-aui-calendar', | |
//Hack up the JSON from the API into Loader Meta-Data | |
hack = function(str) { | |
var json = {}; |
This file contains 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
/*! | |
Copyright (c) 2012 Ryan Grove. All rights reserved. | |
Redistribution and use of this software in source and binary forms, with or | |
without modification, are permitted provided that the following conditions are | |
met: | |
* Redistributions of source code must retain the above copyright notice, this | |
list of conditions and the following disclaimer. |
This file contains 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
# Alias ST2's command line tool for a shorter (easier-to-remember) name | |
alias st="/Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl" | |
# Search for an open Sublime Text to a function definition | |
function fx() { | |
ack "function &?$1\(" | awk {'print $1'} | sed 's/:$//g' | xargs st | |
} | |
# Example usage from the root of a WordPress repository |
OlderNewer