Skip to content

Instantly share code, notes, and snippets.

# add expires headers
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 1 month"
</IfModule>
# disable etags
FileETag None
<IfModule mod_deflate.c>
# Compress all content, manually excluding specified file types
# place filter 'DEFLATE' on all outgoing content
SetOutputFilter DEFLATE
# exclude uncompressible content via file type
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png|rar|zip)$ no-gzip
# properly handle requests coming from behind proxies
<IfModule mod_headers.c>
Header append Vary User-Agent env=!dont-vary
<script type='text/javascript'>
// For js file
loadjscssfile("http://example.com/js/rssfeedreader.js", "js");
// For css file
loadjscssfile("http://example.com/css/rsspage.css", "css");
function loadjscssfile(filename, filetype){
if (filetype == "js") { //if filename is a external JavaScript file
var fileref = document.createElement('script')
fileref.setAttribute("type", "text/javascript")
/**
* @author rajesh gollapudi
*/
$(document).ready(function(){
placeFooter();
$(function(){
$(window).resize(function(){
// console.log('You resized the window!');
if ($('#footer-spacer').length) {
$('#footer-spacer').remove();
<html>
<head>
<style type="text/css">
div#centered {
position: absolute;
}
</style>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js">
</script>
<script type='text/javascript'>
<input type='button' value='Flip Vertical' onclick="demov();" />
<input type='button' value='Flip Horizontal' onclick="demoh();" /> <br/>
<img id='demoimage'
src="http://interactive.finelight.com/blog/wp-content/uploads/2009/10/funny-cartoon.jpg"
alt="funny-cartoon" title="funny-cartoon" width="184" height="200"
class="alignnone size-medium wp-image-595" />
<script src='http://pixastic.com/lib/git/pixastic/pixastic.core.js'></script>
<script src='http://pixastic.com/lib/git/pixastic/actions/flipv.js'></script>
<script src='http://pixastic.com/lib/git/pixastic/actions/fliph.js'></script>
<html>
<head>
<script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js'></script>
<style type='text/css'>
body {
margin: 0 auto;
width: 900px;
padding-top: 100px;
}
#one , #two{
@rajeshg
rajeshg / glogin.php
Created August 27, 2010 17:45
PHP Code - Google Calendar using Zend GData
<?php
require_once 'Zend/Loader.php';
Zend_Loader::loadClass('Zend_Gdata');
Zend_Loader::loadClass('Zend_Gdata_AuthSub');
Zend_Loader::loadClass('Zend_Gdata_Calendar');
Zend_Loader::loadClass('Zend_Gdata_Calendar_ListFeed');
Zend_Loader::loadClass('Zend_Http_Client');
Zend_Loader::loadClass('Zend_Gdata_App_Exception');
Zend_Loader::loadClass('Zend_Gdata_Calendar_ListEntry');
#!/usr/local/bin/ruby -w
require 'csv'
CSV.foreach("contacts.csv") do |row|
name = row[0]
if name.nil?
# do nothing
elsif name.empty?
# do nothing
else
command = "google calendar add --cal \"Finelighters Birthdays\" \"#{name}'s Birthday #{row[1]}\""