Instantly share code, notes, and snippets.

View uriSchemeWithHyperlinkFallback.js
// tries to execute the uri:scheme
function uriSchemeWithHyperlinkFallback(uri, href) {
// set up a timer and start it
var start = new Date().getTime(),
end,
elapsed;
// attempt to redirect to the uri:scheme
// the lovely thing about javascript is that it's single threadded.
// if this WORKS, it'll stutter for a split second, causing the timer to be off
View uriSchemeWithHyperlinkFallback.js
// tries to execute the uri:scheme
function uriSchemeWithHyperlinkFallback(uri, href) {
if(!window.open(uri)){
window.location = href;
}
}
View 52-nvidia-coolbits.conf
Section "Screen"
Identifier "Screen0"
Device "Device0"
Monitor "Monitor0"
DefaultDepth 24
Option "Coolbits" "12"
SubSection "Display"
Depth 24
EndSubSection
EndSection
View index.ejs
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title><%= htmlWebpackPlugin.options.title %></title>
</head>
<body>
<input id="float"/>
</body>
</html>
View index.ejs
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title><%= htmlWebpackPlugin.options.title %></title>
</head>
<body>
<input id="float"/>
</body>
</html>
View Multiple Download example
this.downloadUpload = function (rowid) {
var rowids = rowid ? [rowid] : res.Control.uploadOverview.jqGrid('getGridParam', 'selarrrow');
$.each(rowids, function (ndx, rwd) {
var downloadFrame = $("<iframe></iframe>");
downloadFrame.attr("src", '@Url.Action("DownloadFile", "Upload")?uploadId=' + rwd);
downloadFrame.on("onload", function() {
$(this).remove();
});
$("body").append(downloadFrame);
});
View jquery.ajax.progress.js
(function($) {
var originalXhr = $.ajaxSettings.xhr;
$.ajaxSetup({
progress: $.noop,
xhr: function() {
var req = originalXhr(), that = this;
if (req) {
if (typeof req.addEventListener == "function") {
req.addEventListener("progress", function(evt) {
that.progress(evt);
View Global.asax
public class MvcApplication : HttpApplication
{
protected void Application_Start()
{
ModelValidatorProviders.Providers.Add(new RecursiveModelValidatorProvider());
....
View Proxy.tt
/*
== DO NOT EDIT THIS GENERATED FILE ==
Generated on <#=DateTime.Now.ToShortDateString()#> at <#=DateTime.Now.ToShortTimeString()#>
*/
<#@ template hostspecific="True" #>
<#@ assembly name="System.ServiceModel.dll" #>
<#@ assembly name="System.Xml" #>
<#@ assembly name="EnvDTE" #>
<#@ assembly name="Microsoft.VisualStudio.OLE.Interop" #>
View hash.js
/*
http://www.mojavelinux.com/articles/javascript_hashes.html
added keys array to more easily retrieve the data elements - RH
*/
function Hash() {