Skip to content

Instantly share code, notes, and snippets.

@ryandao
ryandao / prompt_ryandao_setup
Last active November 29, 2016 23:31
My ZSH prompt
autoload -U colors && colors
autoload -Uz vcs_info
autoload -Uz add-zsh-hook
function bgcolor {
echo "\033[48;5;"$1"m"
}
function fgcolor {
echo "\033[38;5;"$1"m"
@ryandao
ryandao / marquee.js
Created July 29, 2014 11:57
Javascript for simple marquee effect
var w = window,
d = document,
e = d.documentElement,
g = d.getElementsByTagName('body')[0],
windowX = w.innerWidth || e.clientWidth || g.clientWidth,
windowY = w.innerHeight|| e.clientHeight|| g.clientHeight;
function cumulativeOffsetLeft(el) {
var left = 0;
var get = Ember.get;
/**
@extends Ember.Mixin
Implements common pagination management properties for controllers.
*/
Ember.PaginationSupport = Ember.Mixin.create({
/**
*/
@ryandao
ryandao / OrderPage.php
Created May 17, 2012 08:33 — forked from frankmullenger/OrderPage.php
Payment Module Outlines
<?php
class OrderPage extends Page {
}
/**
* Represents a page with a form which a user fills out to process payment
*/
class OrderPage_Controller extends Page_Controller {