Skip to content

Instantly share code, notes, and snippets.

View INDIAN2020's full-sized avatar

Gogula Sivannarayana INDIAN2020

View GitHub Profile
@INDIAN2020
INDIAN2020 / gist:5804931
Created June 18, 2013 12:23
less media queries
/* =VARIABLES
---------------------------------------------------------------------------------------------------- */
@size-mobile: 481; /* We're assuming px sizes are to be used. */
@size-tablet: 768;
@size-desktop: 1030;
@size-large: 1240;
/* What all browsers will see since we're taking a '320 and up' approach to media queries.
Source: http://nicolasgallagher.com/mobile-first-css-sass-and-ie/
@INDIAN2020
INDIAN2020 / gist:5829088
Created June 21, 2013 05:33
Wordpress: link to home
<a href="<?php echo home_url('/'); ?>">
@INDIAN2020
INDIAN2020 / gist:5865655
Created June 26, 2013 08:14
media debugger
/*
debugger
http://playground.johanbrook.com/css/mediaquerydebug.html
*/
body::before{
content: "Tablet media query (768 < 979) fired";
font-weight: bold;
display: block;
text-align: center;
background: rgba(255,255,0, 0.9); /* Semi-transparent yellow */
@INDIAN2020
INDIAN2020 / gist:5867297
Created June 26, 2013 13:19
placeholder style
::-webkit-input-placeholder {
color: red;
}
:-moz-placeholder { /* Firefox 18- */
color: red;
}
::-moz-placeholder { /* Firefox 19+ */
color: red;
@INDIAN2020
INDIAN2020 / gist:5890598
Created June 29, 2013 09:59
text tooltop
<a title="This is some information for our tooltip." class="tooltip">CSS3 Tooltip</a>
<style>
.tooltip{
display: inline;
position: relative;
}
.tooltip:hover:after{
background: #333;
background: rgba(0,0,0,.8);
@INDIAN2020
INDIAN2020 / gist:5891081
Created June 29, 2013 13:20
form text field style
box-shadow: 1px 1px 1px rgba(0, 0, 0, .15) inset, 1px 1px 0 rgba(80, 80, 80, .5);
@INDIAN2020
INDIAN2020 / gist:5909242
Created July 2, 2013 13:19
plugin: define variables
define ( 'MY_PLUGIN_PATH', plugin_dir_path(__FILE__) );
define ( 'MY_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
define ( 'MY_PLUGIN_VERSION', 1.1);
define ( 'MY_PLUGIN_NAME', trim(dirname(plugin_basename(__FILE__)), '/')
@INDIAN2020
INDIAN2020 / gist:5925633
Created July 4, 2013 07:31
php: mail to > 1
<?php
$subject = $_POST['subject'];
$message = $_POST['message'];
$message .= $_POST['email'];
$recipients = array(
"[email protected]",
"[email protected]"
// more emails
);
$email_to = implode(',', $recipients);
span {
color: #999;
display: inline-block;
animation: irony 0.9s linear infinite;
}
@keyframes irony {
0% { transform: skew(-15deg,0deg) }
50% { transform: skew(15deg, 0deg); }
100% { transform: skew(-15deg,0deg) }
}
@INDIAN2020
INDIAN2020 / gist:5957131
Created July 9, 2013 12:59
wordpress: sitemap
<?php
//Our custom sitemap which reads the menu order using extended menu walker class
//Shortcode
function wdp_shortcode_sitemap($atts){ //[sitemap]
extract(shortcode_atts(array(
), $atts));
//call the function
$shortcodecontent = wdp_sitemap();
return $shortcodecontent;