Skip to content

Instantly share code, notes, and snippets.

RewriteCond %{PATH_INFO} !^phpmyadmin$
RewriteRule ^$ app/webroot/?url=/ [L]
RewriteCond %{PATH_INFO} !^phpmyadmin$
RewriteRule (.*) app/webroot/$1 [L]
@meeech
meeech / io-start-event.html
Created November 29, 2010 15:51
Making an example of what I'm trying to do to ask in the YUI help channels.
<!DOCTYPE html>
<html>
<head>
<title>IO Global Event?</title>
<script type="text/javascript" src="http://yui.yahooapis.com/combo?3.2.0/build/yui/yui-min.js"></script>
</head>
<body>
<p>Anyone know what I'm doing wrong here?</p>
<p>Would like 2nd codeblock to listen for all io:start events globally, but doesn't seem to work. </p>
<html>
<body>
<ul>
<li>First</li>
<li>Second</li>
<li>Third</li>
<li>Fourth</li>
</ul>
</body>
var tabInit = function(id) {
var tabview = new Y.TabView({
srcNode: id
});
tabview.render();
// @dev used when doing a lot of refresh/modify cycle
// tabview.selectChild(0);
YUI.add('flash-messages', function(Y) {
Y.namespace('mitch');
//@object payload: config options for overlay
Y.Global.on('flash:message', function(payload) {
var overlay = new Y.Overlay(payload);
overlay.get('boundingBox').addClass('flash');
OH HAI
INVISIBLE FLICKR API NICE, MAILCHIMP BETTAHS OM NOM NOM NOM ... CHALLANGE! http://www.youtube.com/watch?v=yYi61ZhSZ74
BTW IM IN UR BUCKKITS MAKIN UP PHORMATS
I HAS lists IZ BUKKIT
I HAS error IN MAH BUKKIT ITZ
Invalid Campaign ID: 775769
KTHX!
I HAS code IN MAH BUKKIT ITZ
300
KTHX!
@meeech
meeech / gist:828919
Created February 16, 2011 05:29
recursively break text into digestable tweets
/**
* finds the index to substr on. looks for space from end of string
* @param string
* @return int
*/
var calculateIndex = function(value) {
var index = value.substr(0,TWEET_SIZE).lastIndexOf(" ");
if (index < 1 || value.length < TWEET_SIZE) {
index = TWEET_SIZE;
@meeech
meeech / gist:829000
Created February 16, 2011 07:37
babys first python - pretty much copy pasta
token_lookup_key = "token-"+users.get_current_user().user_id();
token = memcache.get(token_lookup_key)
if token is None:
token = channel.create_channel(users.get_current_user().user_id())
memcache.add(token_lookup_key, token, 7200)
YUI.add('pjp-bottom-overlay', function(Y) {
//////////BEGIN
var bottomOverlay = false,
xPosition = 150,
yShowPosition = 200,
yHidePosition = 700,
animOver = new Y.Anim({duration: 1});
var oConfig = {
"width": "1000px",
//Update the forrst title bar evey 5 seconds with the
//count of users in the chat room.
//uses some jq
(function(){
var title = $('title'),
originalTitleText = title.html(),
messageCountFrom = false;
var getUserCount = function() {