Skip to content

Instantly share code, notes, and snippets.

@Mantish
Mantish / settings.py
Last active December 24, 2015 12:59
django cms install
# -*- 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
@Mantish
Mantish / css.css
Last active December 23, 2015 09:49
Wordpress responsive youtube embeds
.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 / AuthController.js
Last active December 21, 2015 21:09 — forked from theangryangel/AuthController.js
Sails.js (v0.9.3) authentication using Passportmiddleware
// api/controllers/AuthController.js
var passport = require('passport');
var AuthController = {
login: function (req,res)
{
res.view();
},
@Mantish
Mantish / shipping-awd.php
Last active November 24, 2023 21:55
AWD Weight/CountryShipping plugin modified to make it state based instead of country based. It has some minor tweaks as well
<?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 / sticky-title.js
Last active September 29, 2015 00:48
jQuery plugin to have divs stick to the top of the screen (or at some distance from the top), once scrolled by.
(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 / responsive-images.php
Created October 4, 2011 23:18 — forked from mattwiebe/responsive-images.php
Mobile First Responsive Images for WordPress
<?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/
*/
/**