Skip to content

Instantly share code, notes, and snippets.

Avatar

Ram Ratan Maurya mauryaratan

View GitHub Profile
@mauryaratan
mauryaratan / st3-settings.json
Last active Aug 29, 2015
My Sublime Text settings.
View st3-settings.json
{
"bold_folder_labels": true,
"caret_extra_width": 1,
"color_scheme": "Packages/Theme - Spacegray/base16-ocean.dark.tmTheme",
"draw_white_space": "selection",
"ensure_newline_at_eof_on_save": true,
"file_exclude_patterns":
[
"*.DS_Store",
"*config.codekit",
View gist:e507addaf8f2924db360
Verifying myself: My Bitcoin username is +mauryaratan. https://onename.io/mauryaratan
@mauryaratan
mauryaratan / css_resources.md
Created Apr 17, 2014 — forked from jookyboi/css_resources.md
CSS libraries and guides to bring some order to the chaos.
View css_resources.md

Libraries

  • 960 Grid System - An effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. There are two variants: 12 and 16 columns, which can be used separately or in tandem.
  • Compass - Open source CSS Authoring Framework.
  • Bootstrap - Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.
  • Font Awesome - The iconic font designed for Bootstrap.
  • Zurb Foundation - Framework for writing responsive web sites.
  • SASS - CSS extension language which allows variables, mixins and rules nesting.
  • Skeleton - Boilerplate for responsive, mobile-friendly development.

Guides

@mauryaratan
mauryaratan / javascript_resources.md
Created Apr 17, 2014 — forked from jookyboi/javascript_resources.md
Here are a set of libraries, plugins and guides which may be useful to your Javascript coding.
View javascript_resources.md

Libraries

  • jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
  • Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
  • AngularJS - Conventions based MVC framework for HTML5 apps.
  • Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
  • lawnchair - Key/value store adapter for indexdb, localStorage
@mauryaratan
mauryaratan / functions.php
Created Apr 10, 2014
Allow shortcodes to be used under text widget.
View functions.php
<?php
// Filters that allow shortcodes in Text widgets
add_filter( 'widget_text', 'shortcode_unautop' );
add_filter( 'widget_text', 'do_shortcode' );
@mauryaratan
mauryaratan / woocommerce-search-filter.php
Created Apr 2, 2014
Make your WordPress site use WooCommerce product archives search pages by default.
View woocommerce-search-filter.php
<?php
function crux_search_filter( $query ) {
if ( $query->is_search ) {
$query->set( 'post_type', 'product' );
$query->is_archive = true;
$query->is_post_type_archive = true;
}
return $query;
@mauryaratan
mauryaratan / google-font-fix.css
Created Mar 25, 2014
Fix for Google web fonts rendering bug appeared in Chrome v33.
View google-font-fix.css
body {
-webkit-animation-duration: 0.1s;
-webkit-animation-name: fontfix;
-webkit-animation-iteration-count: 1;
-webkit-animation-timing-function: linear;
-webkit-animation-delay: 0.1s;
}
@-webkit-keyframes fontfix {
from { opacity: 1; }
@mauryaratan
mauryaratan / diff.js
Created Nov 14, 2013
Filter out the unnecessary tag filters. Used in http://demo.codestag.com/forest/
View diff.js
var all_filters = $('#all-skills').data('all-filters'),
all_skills = $('#all-skills').data('all-skills');
all_filters.filter(function(i,v){
if( all_skills.indexOf(i) === -1 ) {
var diff = all_filters[v];
$('.portfolio-filter').find("[data-filter='"+ diff +"']").addClass('invalid');
}
});
View git-props-shortlog-wordpress.sh
# git clone git@github.com:WordPress/WordPress.git .
# TODO: Add support for props that list multiple people
git log -i --grep props | egrep -io 'props (to )?[a-z0-9_\-]*' | sed 's/.* //' | sort | uniq -c | sort -k1nr > shortlog.txt
@mauryaratan
mauryaratan / extends.scss
Last active Dec 21, 2015
Useful Sass Mixins and extend, usable in most projects.
View extends.scss
// Clearfix
%clearfix {
zoom: 1;
&:before,
&:after {
display: table;
content: "";
}
&:after {
clear: both;
You can’t perform that action at this time.