Skip to content

Instantly share code, notes, and snippets.

Avatar

Naresh Shan nareeboy

View GitHub Profile
@nareeboy
nareeboy / gist:10428139
Created Apr 10, 2014
Angular - simple data sorter
View gist:10428139
<div class="main" ng-controller="MyController">
<div class="search">
<h1>Artist Search</h1>
<label for="">search</label>
<input ng-model="query" placeholder="search for artist" autofocus>
<label class="formgroup">By:
<select ng-model="artistOrder">
<option value="name">Name</option>
<option value="reknown">reknown</option>
@nareeboy
nareeboy / gist:10428091
Created Apr 10, 2014
Angular - JSON call script
View gist:10428091
var myAppTest = angular.module('myAppTest' , []);
myAppTest.controller('MyController' , ['$scope' , '$http', function ($scope , $http){
$http.get('js/data.json').success(function(data){
$scope.artists = data;
$scope.artistOrder = 'name';
})
}]);
@nareeboy
nareeboy / gist:8931583
Created Feb 11, 2014
GRUNT: Final Compiler
View gist:8931583
/**
* Grunt task to watch, compile/concate less, concate javascript files during the development process.
* The bulid task also uglyfy javascript and css file and optimize the images.
* @todo: Screenshot on difffeent break points for responsive design
* @todo: Automatic testing
*
* @author Naresh Shan
* @Naresh-shan.com.
* @since 11/02/2014
* @version 1.0
@nareeboy
nareeboy / gist:8595942
Created Jan 24, 2014
HTML: stylesheet link
View gist:8595942
<link rel="stylesheet" href="assets/css/style.css" type="text/css" media="screen" />
@nareeboy
nareeboy / gist:8594456
Created Jan 24, 2014
JQuery: 1.10.2 CDN
View gist:8594456
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
@nareeboy
nareeboy / gist:8021545
Last active Dec 31, 2015
JQuery: jquery-1.10.2.js
View gist:8021545
/*!
* jQuery JavaScript Library v1.10.2
* http://jquery.com/
*
* Includes Sizzle.js
* http://sizzlejs.com/
*
* Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors
* Released under the MIT license
* http://jquery.org/license
View gist:7939838
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Nemo, ipsum, soluta, esse, cum accusamus id numquam voluptates modi similique in tempore dolor sunt iusto mollitia aliquam assumenda velit debitis culpa consequuntur quasi perspiciatis beatae maiores distinctio sed tempora delectus iste non nostrum consectetur reiciendis animi corporis eum aliquid eveniet dignissimos fuga a nesciunt ducimus aspernatur unde. Quae, placeat, sint, obcaecati, esse deserunt voluptates consectetur ducimus aut hic necessitatibus at tempore rerum neque soluta numquam. Et, similique, sapiente, porro a pariatur fugit odit officiis quas illum distinctio aperiam est ipsam corporis dolor cumque ducimus explicabo alias officia iste quibusdam veniam eaque tempora unde incidunt omnis laudantium fugiat labore modi nemo maiores nobis quo nisi ullam architecto adipisci voluptatibus eos vitae esse amet repudiandae! Voluptates, labore, amet perspiciatis explicabo unde minima perferendis ipsam reiciendis ipsa officiis voluptatem architecto
@nareeboy
nareeboy / gist:7926491
Created Dec 12, 2013
GRUNT: Theme Compiler Script
View gist:7926491
/*
* grunt-less-themes
*
*
* Adapted from the grunt-contrib-less module.
* http://gruntjs.com/
*
* Copyright (c) 2012 Tyler Kellen, contributors
* Licensed under the MIT license.
*/
@nareeboy
nareeboy / gist:7913198
Created Dec 11, 2013
JQuery: adding plus and minus to bootstrap accordian
View gist:7913198
$(document).ready(function(){
$('[data-toggle="collapse"]').click(function(e) {
// alert(e.target);
$(e.target).find('.icon-minus-circled, .icon-plus-circled').toggleClass("icon-minus-circled icon-plus-circled");
});
});
@nareeboy
nareeboy / gist:7797287
Created Dec 4, 2013
JQuery: Jquery 1.9.1
View gist:7797287
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/1.9.1/jquery.min.js" type="text/javascript"></script>