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/php | |
<?php | |
/** | |
* YUI Compress CLI Util | |
* | |
* usage: (assuming the script is in your path, executable, and you are in the root directory of the files.) | |
* | |
* yuicompress.php javascript.js rollover.js links.js tabber/tabber-minimized.js utility_effects.js | |
* | |
* or |
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
var myCookie; | |
myCookie = function(config) { | |
myCookie.superclass.constructor.apply(this,arguments); | |
}; | |
Y.extend(myCookie, Y.Cookie, { | |
_createCookieString : function (name /*:String*/, value /*:Variant*/, encodeValue /*:Boolean*/, options /*:Object*/) /*:String*/ { | |
options = options || {}; |
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
Hi. Trying to validate a model inside the controller. | |
Thing is, I am trying to submit a few at once. | |
I've made the forms fields like so: | |
ShareMail.0.name, | |
ShareMail.0.email, | |
ShareMail.1.name, | |
ShareMail.1.email, | |
but am having trouble validating them in the controller. |
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 | |
/** | |
* Application Controller | |
* | |
* | |
* @package cake | |
* @subpackage cake.app | |
*/ | |
class AppController extends Controller { |
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 | |
/** | |
* Find the index position of the nth occurrence of a string | |
* | |
* @param string $haystack Frag we looking for | |
* @param string $needle Frag we looking for | |
* @param int $nth | |
* @return false/int false on not found, else int of strpos | |
**/ |
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
// A plugin class designed to extend Y.Plugin.NodeMenuNav to allow pining of menu | |
// We want to allow a submenu to specify bltl, tlbr and so forth | |
function NavPinSubMenu() { | |
NavPinSubMenu.superclass.constructor.apply(this, arguments); | |
} | |
// Define Static properties NAME (to identify the class) and NS (to identify the namespace) | |
NavPinSubMenu.NAME = 'navPinSunMenu'; | |
NavPinSubMenu.NS = 'menuNav'; |
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 ruby | |
require 'net/http' | |
require 'uri' | |
require 'rubygems' | |
require 'json' | |
require 'config.rb' | |
# puts URI.escape($posterous_auth_email) | |
theme_url = "http://posterous.com/api/2/users/#{$posterous_user_id}/sites/#{$posterous_site_id}/theme?api_token=#{$posterous_api_token}" |
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
// Create new YUI instance, and populate it with the required modules | |
YUI().use('autocomplete', function(Y) { | |
//Begin Closure | |
//Used to parse out the JSONP reponse from the server. | |
YUI.namespace('Vault.ac').parseResponse = function(results) { | |
return results; | |
}; | |
if(Y.one('#q')) { |
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 ruby | |
# script that goes and fetches your posterous.com theme file. | |
require 'net/http' | |
require 'uri' | |
require 'rubygems' | |
require 'json' | |
# config.rb should contain all the global vars found in this script. | |
require 'config.rb' |
OlderNewer