Skip to content

Instantly share code, notes, and snippets.

View aabir's full-sized avatar
🙂

Shible Chowdhury aabir

🙂
View GitHub Profile
@aabir
aabir / Menu
Created May 12, 2014 08:13
Basic Menu To Start Over
<!doctype html>
<html>
<head>
<title> Custom Menu </title>
<style>
.main-menu { width: 500px; margin: 0 auto; background: #666666; overflow: hidden; }
ul { list-style: none; margin: 0; padding:0; display: inline; }
ul li { display: inline-block; background: #666666; padding: 10px 5px;}
ul li:hover { background: #ccc; }
@aabir
aabir / app.css
Last active August 29, 2015 14:02
#main {
width: 400px;
height: 300px;
margin: auto; }
#center-circle {
border: 10px solid #746EBB;
border-bottom-color:#ECEBFA;
-webkit-transform: rotate(360deg);
@aabir
aabir / Meta tags
Last active August 29, 2015 14:10
Meta tags for Google, Facebook, Google Plus, Twitter
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<meta name="description" content="">
<meta name="keywords" content="" />
<meta name="author" content="Shible Noman Aabir, shblnmn@gmail.com">
<meta name="robots" content="index, follow" />
<meta name="programmer" content="Shible Noman Aabir" />
<meta name="format-detection" content="telephone=no">
<!-- Facebook -->
<meta property="og:title" content="Web Developer - Shible Noman Aabir" />
<meta property="og:site_name" content="Portfolio - Shible Noman Aabir" />
@aabir
aabir / gist:645ca4f53c0f8f0ef799
Created December 16, 2014 06:54
HTAccess file to redirect a site to its sub folder
<IfModule mod_rewrite.c>
Redirect /index.php http://example.com/shop/
</IfModule>
@aabir
aabir / video
Created January 10, 2015 18:51
Youtube video API for custom video control and thumbnail.
var player;
// this function gets called when API is ready to use
function onYouTubePlayerAPIReady() {
// create the global player from the specific iframe (#video)
player = new YT.Player('player', {
events: {
// call this function when player is ready to use
'onReady': onPlayerReady,
'onStateChange': onPlayerStateChange
@aabir
aabir / Blockspring API
Last active August 29, 2015 14:13
Grab website screen shot using API
<?php
$url = 'https://sender.blockspring.com/api_v2/blocks/07b6410853fa5343076db5d742de58e7?api_key=you_api_key';
$data = json_encode(array("url" => "http://www.facebook.com/", 'width' => 1200, 'height' => 1000));
// use key 'http' even if you send the request to https://...
$options = array(
'http' => array(
'header' => array("Accept: application/json", "Content-Type: application/json"),
'method' => 'POST',
'content' => $data,
@aabir
aabir / Map api 3
Created January 20, 2015 06:00
Google map API version 3 example
<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?v=3&sensor=false"></script>
<script>
function initialize() {
// Create an array of styles.
var styles = [
{
"featureType": "landscape",
"elementType": "geometry.fill",
"stylers": [
@aabir
aabir / gist:34c1a4508d0a79db67b5
Created February 4, 2015 12:37
Jquery auto complete with categories and image result.
jQuery.widget( "custom.catcomplete", $.ui.autocomplete, {
_create: function() {
this._super();
this.widget().menu( "option", "items", "> :not(.ui-autocomplete-category)" );
},
_renderMenu: function( ul, items ) {
var that = this,
currentCategory = "";
$.each( items, function( index, item ) {
var li;
@aabir
aabir / flexslider.css
Created March 8, 2015 14:11
Flexslider CSS navigation arrow visible
/*
* jQuery FlexSlider v2.3.0
* http://www.woothemes.com/flexslider/
*
* Copyright 2012 WooThemes
* Free to use under the GPLv2 license.
* http://www.gnu.org/licenses/gpl-2.0.html
*
* Contributing author: Ville Ristimäki (@villeristi)
*
@aabir
aabir / js
Created June 25, 2015 08:35
Smooth scrolling in page IDs
jQuery(function($) {
$('a[href*=#]:not([href=#])').click(function() {
if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
var target = $(this.hash);
target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
if (target.length) {
$('html,body').animate({
scrollTop: target.offset().top
}, 1000);
return false;