Skip to content

Instantly share code, notes, and snippets.

@Mantish
Mantish / responsive-images.php
Created Oct 4, 2011 — forked from mattwiebe/responsive-images.php
Mobile First Responsive Images for WordPress
View responsive-images.php
<?php
/*
Plugin Name: Mobile First Responsive Images
Description: Serve up smaller images to smaller screens.
Version: 0.1.1
Author: Matt Wiebe
Author URI: http://somadesign.ca/
*/
/**
@Mantish
Mantish / sticky-title.js
Last active Sep 29, 2015
jQuery plugin to have divs stick to the top of the screen (or at some distance from the top), once scrolled by.
View sticky-title.js
(function($)
{
$.fn.stickytitle = function(options)
{
var opts = $.extend($.fn.stickytitle.defaults, options);
var elements = this, starting_offsets = new Array();
elements.each(function(index){
//before anything happens, the original top offsets of each element are saved
starting_offsets[index] = $(this).offset().top;
});
@Mantish
Mantish / shipping-awd.php
Last active Dec 17, 2015
AWD Weight/CountryShipping plugin modified to make it state based instead of country based. It has some minor tweaks as well
View shipping-awd.php
<?php
/**
* Plugin Name: AWD Weight/State Shipping
* Plugin URI: http://www.andyswebdesign.ie/blog/free-woocommerce-weight-and-country-based-shipping-extension-plugin/
* Description: Weight and State based shipping method for Woocommerce.
* Version: 1.0.1
* Author: Andy_P (modified by Mantish to make it state based)
/* Copyright 2012 andyswebdesign.ie
This program is free software; you can redistribute it and/or modify
@Mantish
Mantish / AuthController.js
Last active Dec 21, 2015 — forked from theangryangel/AuthController.js
Sails.js (v0.9.3) authentication using Passportmiddleware
View AuthController.js
// api/controllers/AuthController.js
var passport = require('passport');
var AuthController = {
login: function (req,res)
{
res.view();
},
@Mantish
Mantish / css.css
Last active Dec 23, 2015
Wordpress responsive youtube embeds
View css.css
.embed-container {
height: auto;
max-width: 100%;
overflow: hidden;
padding-bottom: 56.25%;
padding-top: 30px;
position: relative;
}
.embed-container iframe,
.embed-container object,
@Mantish
Mantish / settings.py
Last active Dec 24, 2015
django cms install
View settings.py
# -*- coding: utf-8 -*-
import os
gettext = lambda s: s
PROJECT_PATH = os.path.split(os.path.abspath(os.path.dirname(__file__)))[0]
# Django settings for project.
DEBUG = True
TEMPLATE_DEBUG = DEBUG