Skip to content

Instantly share code, notes, and snippets.

@Jayaramki
Jayaramki / example.css
Last active August 29, 2015 14:20 — forked from damko/example.css
.nav, .pagination, .carousel, .panel-title a { cursor: pointer; }
.ng-isolate-scope > .nav-tabs {
border-bottom: 0;
}
.tab-content > .tab-pane,
.pill-content > .pill-pane {
display: none;
function isDate(dateArg) {
var t = (dateArg instanceof Date) ? dateArg : (new Date(dateArg));
return !isNaN(t.valueOf());
}
function isValidRange(minDate, maxDate) {
return (new Date(minDate) <= new Date(maxDate));
}
@Jayaramki
Jayaramki / get_dates.php
Last active October 30, 2022 15:39
Get All Dates in given month and year in php
/*Get All Dates in given month and year in php by CJ Ramki (http://cj-ramki.blogspot.in)*/
function get_dates($month,$year){
$numbers = array('1','2','3','4','5','6','7','8','9');
$datesArray = array();
$num_of_days = date('t',mktime (0,0,0,$month,1,$year));
for( $i=1; $i<= $num_of_days; $i++) {
if(in_array($i,$numbers)) $i = '0'.$i;
//complete date in Y-m-d format
@Jayaramki
Jayaramki / country_list.php
Last active August 29, 2015 14:01
country list in php array
function countryList() {
return array('Afghanistan' => 'Afghanistan',
'Albania' => 'Albania',
'Algeria' => 'Algeria',
'Andorra' => 'Andorra',
'Angola' => 'Angola',
'Antigua & Deps' => 'Antigua &amp; Deps',
'Argentina' => 'Argentina',
'Armenia' => 'Armenia',
'Australia' => 'Australia',
@Jayaramki
Jayaramki / timezone.php
Last active August 29, 2015 14:01
PHP supported timezones.
function time_zone(){
return array('Kwajalein' => '(GMT-12:00) International Date Line West',
'Pacific/Midway' => '(GMT-11:00) Midway Island',
'Pacific/Samoa' => '(GMT-11:00) Samoa',
'Pacific/Honolulu' => '(GMT-10:00) Hawaii',
'America/Anchorage' => '(GMT-09:00) Alaska',
'America/Los_Angeles' => '(GMT-08:00) Pacific Time (US &amp; Canada)',
'America/Tijuana' => '(GMT-08:00) Tijuana, Baja California',
'America/Denver' => '(GMT-07:00) Mountain Time (US &amp; Canada)',
'America/Chihuahua' => '(GMT-07:00) Chihuahua',
@Jayaramki
Jayaramki / Reverse_DOM.html
Last active August 29, 2015 14:00
Reverse DOM elements usign jquery
<!--Here is the HTML code-->
<div class="parent">
<div class="child">1</div>
<div class="child">2</div>
<div class="child">3</div>
<div class="child">4</div>
<div class="child">5</div>
</div>
<input type="button" id="btn" value="Show DESC">
/*!
* classie - class helper functions
* from bonzo https://github.com/ded/bonzo
*
* classie.has( elem, 'my-class' ) -> true/false
* classie.add( elem, 'my-new-class' )
* classie.remove( elem, 'my-unwanted-class' )
*/
/*jshint browser: true, strict: true, undef: true */