Skip to content

Instantly share code, notes, and snippets.

View surjithctly's full-sized avatar

Surjith S M surjithctly

View GitHub Profile
@surjithctly
surjithctly / retina.js
Created August 26, 2015 13:45
Retina Images JQuery @2x Replace
/* retina
--------- */
if (window.devicePixelRatio > 1){
$(".retina").imagesLoaded(function(){
$(".retina").each(function(){
var src = $(this).attr("src").replace(".","@2x.");
var h = $(this).height();
var w = $(this).width();
$(this).attr("src",src).css({height:h,width:'auto'});
});
@surjithctly
surjithctly / Window height
Created February 11, 2014 10:59
Window height for div even on resize
$(document).ready(function(){
function e(){
var e=$(window).height();
$(".banner").css("height",e)
}
e(),$(window).resize(e)})

Contract Killer

The popular open-source contract for web designers and developers by Stuff & Nonsense

  • Originally published: 23/12/2008
  • Revised date: 15/12/2013
  • Original post

@surjithctly
surjithctly / gist:6f40d414afb913f52a2a
Created June 27, 2015 09:33
Remove root Password from PHPmyAdmin Localhost
/*
Wamp => SQL Console => Paste the code belwo
*/
SET PASSWORD FOR root@localhost=PASSWORD('');
@surjithctly
surjithctly / bootstrap-nav-responsive.css
Last active August 29, 2015 14:24
Bootstrap Navigation Collapse on larger screens (eg: 992 or 1200)
/*
* Responsive Nav on larger screens
*/
@media (max-width: 992px) {
.navbar-header {
float: none;
}
.navbar-left,
.navbar-right {
@surjithctly
surjithctly / mail-test.php
Last active August 29, 2015 14:27 — forked from Dreyer/mail-test.php
Quick & Dirty PHP Mail Test Script
<?php
/*
DONT FORGET TO DELETE THIS SCRIPT WHEN FINISHED!
*/
ini_set( 'display_errors', 1 );
error_reporting( E_ALL );
$from = 'webmaster@example.com';
@surjithctly
surjithctly / Features Rotator.js
Created August 24, 2015 14:56
Features Rotator
/*http://good.co/*/
$(document).ready(function (){
// If menu item has classname "nav-no-click" then return false
$('li.nav-no-click > a').click( function() {
return false;
});
$('#features-rotator-row').find('.features-rotator-item').each(function(index, element) {
@surjithctly
surjithctly / simple-phpmailer.php
Created October 13, 2015 11:19
Simple PHPMailer() Contact Form
<?php
require_once "phpmailer/class.phpmailer.php";
//PHPMailer Object
$mail = new PHPMailer;
//From email address and name
$mail->From = "from@yourdomain.com";
$mail->FromName = "Full Name";
@surjithctly
surjithctly / bootstrap-nav-menu-hover.css
Created October 17, 2015 08:06
Boostrap navigation menu on Hover (Desktop Only)
/************************
* Nav Menu on Hover
***********************/
/*only for screens greater than 992px */
@media (min-width: 992px) {
.navbar .navbar-nav > li.dropdown > ul {
display: block;
opacity: 0;
visibility: hidden;
@surjithctly
surjithctly / emmet-sublime-shortcuts.md
Last active October 20, 2015 07:47
Emmet Sublime Shortcuts

Emmet Sublime Shortcuts

Expand CSS Properties

-transition

To expand Browser Prefixes, Type propery name with a leading dash (-) and press TAB or Ctrl + E