Skip to content

Instantly share code, notes, and snippets.

@okuniw
okuniw / applyBootstrapToASPNetMenuControl.html
Created March 17, 2015 02:00
Apply Bootstrap To ASPNet Menu Control
<!-- 1. wrap with a div to force generated menu float -->
<div style="float: left;">
<!--
2. set [SkipLinkText=""] to hide skip link anchor tag (which will cause element shift in chrome)
3. set [IncludeStyleBlock="false"] to disable asp.net menu control's styles, which would conflict with bootstrap styling
4. apply bootstrap css to menu
4.1 CssClass="nav navbar-fix-top"
4.2 StaticMenuStyle-CssClass="nav navbar-nav"
4.3 StaticSelectedStyle-CssClass="active"
4.4 DynamicMenuStyle-CssClass="dropdown-menu"
@okuniw
okuniw / html5PictureTagTest.html
Created March 12, 2015 08:35
html5 picture tag test
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<picture alt="description">
<!-- request image based on browser's width -->
<source srcset="big.jpg" media="(min-width: 800px)">
<source srcset="medium.jpg" media="(min-width: 400px)">
@okuniw
okuniw / mobiscrollDatePicker.html
Last active August 29, 2015 14:16
Minimum settings (?) to use mobiscroll's date picker
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0">
<!-- jQuery Include -->
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
<script src="js/mobiscroll.core.js"></script> <!-- core -->
@okuniw
okuniw / modernizrReplacehtml5shivjs.html
Last active August 29, 2015 14:16
Use modernizr.js instead of html5shiv.js, because it's alread included.
<!-- modernizr includes html5shiv.js, it's been put outside of conditional comment
because modernizr function will be used in modern browsers -->
<script src="../Scripts/modernizr-2.8.3.min.js" type="text/javascript"></script>
<!--[if lt IE 9]>
<script type="text/javascript" src="../Scripts/bootstrap/respond.min.js"></script>
<![endif]-->
@okuniw
okuniw / modernizrDetectDateInput.js
Created March 3, 2015 02:26
Modernizr detect date input
$(function () {
if (Modernizr.inputtypes.date == false) {
$("input[type=date]").focus(function () {
WdatePicker();
});
}
});
@okuniw
okuniw / BootstrapNavbarExample.html
Last active August 29, 2015 14:16
bootstrap navbar example
<nav class="navbar navbar-default">
<!-- logo & menu icon -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="home.aspx">Logo Text</a>
@okuniw
okuniw / FooTableJQueryPluginExample.html
Last active August 29, 2015 14:16
Use FooTable jQuery plugin
<!-- from http://fooplugins.com/footable-demos/ -->
<html>
<head>
<link href="path_to_your_css/footable.core.css" rel="stylesheet" type="text/css" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js" type="text/javascript"></script>
<script src="path_to_your_js/footable.js" type="text/javascript"></script>
<script type="text/javascript">
$(function () {
$('.footable').footable();
});
@okuniw
okuniw / ScriptForOldIEUseBootstrap.html
Last active August 29, 2015 14:16
add the conditional comments to html, to make IE 9 and earlier version to use bootstrap
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->boo
@okuniw
okuniw / RemoveWidthSetting.css
Last active August 29, 2015 14:16
Remove CSS width settings before apply bootstrap
body
{
/*min-width: 1000px;*/
}
@okuniw
okuniw / Query SQL Server Database Mail Log.sql
Last active December 30, 2015 18:09
Query SQL Database Mail Log
select a.send_request_date
,a.sent_date
,a.sent_status
,a.subject
,a.recipients
,a.copy_recipients
,a.blind_copy_recipients
,l.event_type
,l.log_date
,l.description