Skip to content

Instantly share code, notes, and snippets.

View palimadra's full-sized avatar

Pali Madra palimadra

  • Chandigarh, India
View GitHub Profile
Andhra Pradesh
Arunachal Pradesh
Assam
Bihar
Chhattisgarh
Goa
Gujarat
Haryana
Himachal Pradesh
Jammu and Kashmir
@palimadra
palimadra / subreddit-stylesheet
Created October 24, 2014 16:40
Subreddit stylesheet
/* -------------------------------------------------
The style sheet is from the subreddit at
http://www.reddit.com/r/GetMotivated
The reason the stylesheet has been copied
is because it seems to follow for writing
css. For example defining the colors at the start.
Another reason is to see how an image can be
@palimadra
palimadra / city-list-india
Created January 30, 2017 10:24
List of cities in India for a drop down element in a form
Adilabad
Agra
Ahmedabad
Ahmednagar
Aizawl
Ajitgarh (Mohali)
Ajmer
Akola
Alappuzha
Aligarh
@palimadra
palimadra / custom-login-wordpress
Created July 1, 2012 17:15
Custom login form with full screen background
function login_enqueue_scripts(){
echo '
<div class="background-cover"></div>
<style type="text/css" media="screen">
.background-cover{
background:url('.get_bloginfo('template_directory').'/images/background) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
@palimadra
palimadra / auto-description-tag-wp
Created June 30, 2012 14:26
WordPress - Automatically generate meta description from content
function create_meta_desc() {
global $post;
if (!is_single()) { return; }
$meta = strip_tags($post->post_content);
$meta = strip_shortcodes($post->post_content);
$meta = str_replace(array("\n", "\r", "\t"), ' ', $meta);
$meta = substr($meta, 0, 125);
echo "<meta name='description' content='$meta' />";
}
add_action('wp_head', 'create_meta_desc');
@palimadra
palimadra / drop-down-menu-subreddit
Created October 24, 2014 16:53
subreddit stylesheet with sidebar with drop-down menu
.submit.submit-link { display: none; }
/*
This is the stule sheet for subreddit
at http://www.reddit.com/r/WritingPrompts.
The menu in the sidebar is interesting and
that needs to be investigated
WritingPrompts Stylesheet Episode 3
Revenge Of The CSS3
@palimadra
palimadra / stackedit-markdown-cheat-sheet
Last active March 31, 2022 23:16
Cheat Sheet for Markdown on stackedit.io
<!---
Author: Pali Madra
URL: http://palimadra.tumblr.com
Description: Cheat sheet for markdown on stackedit.io at http://www.stackedit.io
Version: 1.0
Last updated: 10/26/2014
--->
<!--- HEADING --->
# Header 1 #
@palimadra
palimadra / remove-menu-items-admin-wordpress
Created July 1, 2012 17:07
Remove menu items from WordPress admin bar
function wps_admin_bar() {
global $wp_admin_bar;
$wp_admin_bar->remove_menu('wp-logo');
$wp_admin_bar->remove_menu('about');
$wp_admin_bar->remove_menu('wporg');
$wp_admin_bar->remove_menu('documentation');
$wp_admin_bar->remove_menu('support-forums');
$wp_admin_bar->remove_menu('feedback');
$wp_admin_bar->remove_menu('view-site');
}
@palimadra
palimadra / wordpress_contact_form_7_styles
Created October 26, 2012 17:43
Styles for Contact form 7 plugin for WordPress
.wpcf7 input,
.wpcf7 textarea{
padding:10px;
color:#8e8e8e;
font-family:Arial, Helvetica, sans-serif;
font-size:16px;
line-height: 20px;
border: solid 1px #9f9f9f;
@palimadra
palimadra / fb-gallery-embed.html
Created January 31, 2014 07:09 — forked from alexdunae/fb-gallery-embed.html
Embed a Facebook gallery into your website