Skip to content

Instantly share code, notes, and snippets.

View rmdort's full-sized avatar

Vinay M rmdort

View GitHub Profile
@rmdort
rmdort / index.html
Created September 27, 2010 04:33 — forked from boazsender/index.html
<!DOCTYPE html>
<html>
<head>
<title>Twitter Search Plugin</title>
<script src="http://code.jquery.com/jquery.js"></script>
<script src="jquery.twitter.js"></script>
<style type="text/css">
.twitter-posts li {margin-bottom: 10px; font-size: 12px; clear: both; list-style-type:none;}
.twitter-posts li img {float:left; width: 48px; margin:0px 10px 10px 0px;border:1px solid #c2c2c2; -moz-box-shadow: 0px 0px 4px #c2c2c2; -webkit-box-shadow: 0px 0px 4px #c2c2c2; box-shadow: 0px 0px 4px #c2c2c2;}
.twitter-posts li a {text-decoration:none; color: #009;}
{exp:freeform:form form_name="tellafriend" required="name|email|senderemail"
send_user_email="yes" user_email_template="tellafriend" template="brief_version" return="seaawards/nominate/thankyou"}
<fieldset>
<label for="name">Your Name</label>
<input type="text" name="name" id="name" value="{if screen_name!=''}{screen_name}{/if}" />
</fieldset>
<fieldset>
<label for="senderemail">Your Email Address</label><input type="text" name="senderemail" id="senderemail" value="{email}" />
@rmdort
rmdort / jscrollpane.js
Created December 19, 2010 09:51
Added iOS and Android Support for jScrollPane
// Ipad Iphone
if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i)) || (navigator.userAgent.match(/iPad/i))||(navigator.userAgent.match(/Android/i))) {
var isTouchScreen = 1;
}else{
var isTouchScreen = 0;
}
$container.bind('touchstart', function(e){
var cpos = dragPosition;
@rmdort
rmdort / routes_ee
Created December 19, 2010 18:36
Sammy.js Routes for Expression Engine
// Sammy Routes for Expression Engine
this.get('#/', function(context) {
this.partial('{path=sammy/home}');
context.app.swap();
});
this.get('#!/:url', function(context) {
this.partial('{path=sammy}/'+this.params['url']);
});
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Doodle.js Demo - Bouncy Balls</title>
<!--[if IE]>
<script type="text/javascript" src="http://explorercanvas.googlecode.com/svn/trunk/excanvas.js"></script>
<![endif]-->
<script type="text/javascript" src="http://cloud.github.com/downloads/biilly/doodle.js/doodle-0.1.1.min.js"></script>
<?php
/**
* Custom configuration bootsrtap file for ExpressionEngine
*
* Place config.php in your site root
* Add require(realpath(dirname(__FILE__) . '/../../config.php')); to the bottom of system/expressionengine/config/config.php
* Add require(realpath(dirname(__FILE__) . '/../../config.php')); to the bottom of system/expressionengine/config/database.php
* If you have moved your site root you'll need to update the require_once path
*
#!/bin/env ruby
if ARGV.empty?
$stderr.puts <<-EOM
ExpressionEngine (1.x) MYSQL DUMP Localizer
1. Reads MYSQL DUMP of ExpressionEngine website from STDIN
2. Replaces ALL HOSTNAME & PATH data (config) with LOCAL SETTINGS
3. Output corrected MYSQL DYMP file.
@rmdort
rmdort / Parsedir
Created March 19, 2011 16:12
Parse Expression Engine File Directories
function parsefile($str = '')
{
$EE =& get_instance();
$str = ($str == '') ? $EE->TMPL->tagdata : $str;
$EE->load->library('typography');
return $EE->typography->parse_file_paths($str);
}
// Original code from http://www.blog.highub.com/mobile-2/a-fix-for-iphone-viewport-scale-bug/
var metas = document.getElementsByTagName('meta');
var i;
if (navigator.userAgent.match(/iPhone/i)) {
for (i=0; i<metas.length; i++) {
if (metas[i].name == "viewport") {
metas[i].content = "width=device-width, minimum-scale=1.0, maximum-scale=1.0";
}
}
@rmdort
rmdort / simplecarousel.js
Created October 11, 2011 03:22
Simple Carousel with prev, next and pager
var carousel = {
init: function(){
this.carousel = jQuery('#Testimonials');
this.prev = $('#PagePrev');
this.next = $('#PageNext');
this.pager = $('#Pager');
this.appendpager();