Skip to content

Instantly share code, notes, and snippets.

<script id="js-template-messages" type="text/x-kendo-template">
<ul class="bo-list bo-card__list bo-articles bo-articles--static">
# if (messages.length > 0) { #
# for (var i=0; i < messages.length; i++) { #
<li class="bo-card__item">
<span class="bo-article__headline bo-article__headline--static"> #= messages[i].messageTitle #</span>
<span class="bo-article__description bo-article__description--static">#= messages[i].messageText #</span>
</li>
# } #
# } # @*else { #
@attebury
attebury / contextAutocomplete.js
Created May 1, 2017 16:47
Autocomplete template
// Uses AMD or browser globals to create a jQuery plugin.
// It does not try to register in a CommonJS environment since
// jQuery is not likely to run in those environments.
// See jqueryPluginCommonJs.js for that version.
(function (factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['jquery'], factory);
@attebury
attebury / Index.cshtml
Last active August 15, 2018 18:57
Snapshot Templates
@using SAIF.Common.Extensions
@model ClaimSnapshot.ViewModels.SnapshotViewModel
@{
ViewBag.Title = Model.Header;
}
@Html.AntiForgeryToken()
<div id="SnapshotKeys">
<input id="ActiveClaimId" value="@Model.ActiveClaimId" type="hidden" />
<input id="js-active-cards" value="@Model.ActiveCards" type="hidden" />
@attebury
attebury / getStoredProcedures.sql
Last active November 14, 2018 17:17
MS SQL queries
/** https://stackoverflow.com/questions/219434/query-to-list-all-stored-procedures **/
select *
from DatabaseName.information_schema.routines
where routine_type = 'PROCEDURE'
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<label for="js-file-fed">File to import</label><input type="file" id="js-file-fed" accept="text/plain">
<p />
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<label for="js-file-fed">File to import</label><input type="file" id="js-file-fed" accept="text/plain">
<p />
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<style id="jsbin-css">
body{font-family: sans-serif}
.mt-move--table {
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
syntax: glob
# User-specific files
*.rsuser
*.suo
@attebury
attebury / run.ps1
Created August 19, 2020 16:37
Run Powershell Script on Remote Server
powershell -file "C:\{{file}}.ps1"
@attebury
attebury / code.js
Last active August 23, 2020 09:31
Regular Expression to add JS extension to module imports in Visual Studio Code
// Used in VS Code's Find and Replace
// Note that this will add JS extension to any import that already has .js
// You may want to search for .js.js after running this
// Find in folder(s)
(^import[\s{\w,?}]*[from]?\s)(['\.\/a-z\/\-]*)';?
// Replace
$1$2.js';