Skip to content

Instantly share code, notes, and snippets.

View amitabhaghosh197's full-sized avatar

amitabha ghosh amitabhaghosh197

View GitHub Profile
@amitabhaghosh197
amitabhaghosh197 / gulpfile-with-merge-stream.md
Last active September 9, 2017 15:08
Important Gulp Files #gulp #javascript
var gulp = require('gulp');
var gutil = require('gulp-util');

var sass = require('gulp-sass');
var sourcemaps = require('gulp-sourcemaps');
var autoprefixer = require('gulp-autoprefixer');
var merge = require('merge-stream');
var cleanCSS = require('gulp-clean-css');
var cssmin = require('gulp-cssmin');
@amitabhaghosh197
amitabhaghosh197 / search-keyword.md
Last active September 9, 2017 15:09
Search Keywords #keywords #search

Designs

  1. Blur Instagram - Blurred HD Backgrounds
  2. Polygon Backgrounds
  3. Water color splash backgrounds
  4. Grunge Blur Backgrounds
  5. geometry backgrounds hd
  6. ios ui kit
@amitabhaghosh197
amitabhaghosh197 / SCSS.md
Last active September 9, 2017 15:10 — forked from jareware/SCSS.md
Advanced SCSS, or, 16 cool things you may not have known your stylesheets could do #sass

⇐ back to the gist-blog at jrw.fi

Advanced SCSS

Or, 16 cool things you may not have known your stylesheets could do. I'd rather have kept it to a nice round number like 10, but they just kept coming. Sorry.

I've been using SCSS/SASS for most of my styling work since 2009, and I'm a huge fan of Compass (by the great @chriseppstein). It really helped many of us through the darkest cross-browser crap. Even though browsers are increasingly playing nice with CSS, another problem has become very topical: managing the complexity in stylesheets as our in-browser apps get larger and larger. SCSS is an indispensable tool for dealing with this.

This isn't an introduction to the language by a long shot; many things probably won't make sense unless you have some SCSS under your belt already. That said, if you're not yet comfy with the basics, check out the aweso

@amitabhaghosh197
amitabhaghosh197 / check-current-page-has-children.md
Last active September 9, 2017 15:06 — forked from lukaszklis/gist:1247306
WordPress: check if a current page has children, if so display them, if not display all pages on the same level as current page #wordpress #has children
<?php

// Your functions.php content

function has_children() {
  global $post;
  
  $pages = get_pages('child_of=' . $post->ID);
 
@amitabhaghosh197
amitabhaghosh197 / sass.md
Last active October 17, 2017 06:32
Sass Important #sass #important #usefull
@amitabhaghosh197
amitabhaghosh197 / 1. Example.scss
Last active September 9, 2017 15:11 — forked from Integralist/1. Example.scss
Sass Mixin for CSS3 Animations #sass
@include keyframe(fadeout) {
0% {
opacity: 1;
}
100% {
opacity: 0;
}
}
@amitabhaghosh197
amitabhaghosh197 / css-calc.css
Last active September 9, 2017 15:14 — forked from jonkemp/css-calc.css
Cross Browser CSS Calc() #css
/* 1. write it out for older browsers */
/* 2. use the vendor prefix for webkit */
/* 3. use the vendor prefix for moz */
/* 4. include the un-prefixed version last */
#foo {
width: 200px;
width: -webkit-calc(50% - 100px);
width: -moz-calc(50% - 100px);
width: calc(50% - 100px);
@amitabhaghosh197
amitabhaghosh197 / 99-designs.md
Last active September 9, 2017 15:14
99 designs all #design #ui
@amitabhaghosh197
amitabhaghosh197 / high-dpi-media.css
Last active September 9, 2017 15:15 — forked from wylieconlon/high-dpi-media.css
A CSS media query that captures almost all high DPI aware devices. #css #sass #print-css
/* -------------------------------------------------------- */
/* */
/* A media query that captures: */
/* */
/* - Retina iOS devices */
/* - Retina Macs running Safari */
/* - High DPI Windows PCs running IE 8 and above */
/* - Low DPI Windows PCs with IE zoomed in */
/* - Android hdpi devices and above */
/* - Android tvdpi devices, including Google Nexus 7 */
@amitabhaghosh197
amitabhaghosh197 / shortcodes-remove-p-tag.php
Last active September 9, 2017 15:15 — forked from bitfade/gist:4555047
WordPress - Remove empty p tags for custom shortcodes #wordpress #wordpress-shortcodes
// Remove all P tags from shortcodes
<?php
add_filter("the_content", "the_content_filter");
function the_content_filter($content) {
// array of custom shortcodes requiring the fix
$block = join("|",array("col","shortcode2","shortcode3"));