Skip to content

Instantly share code, notes, and snippets.

View mikaelweave's full-sized avatar
🔥

Mikael Weaver mikaelweave

🔥
View GitHub Profile
@mikaelweave
mikaelweave / Recycle All App Pools
Last active November 9, 2017 16:50
Recycle all application pools on a server
Write-Host ""
Write-Host "Starting App Pool Recycle...." -ForegroundColor Magenta
& $env:windir\system32\inetsrv\appcmd list apppools /state:Started /xml | & $env:windir\system32\inetsrv\appcmd recycle apppools /in
Write-Host "Recycle Complete" -ForegroundColor Magenta
Write-Host ""
@mikaelweave
mikaelweave / SQL Combine rows into one
Last active November 9, 2017 16:51
Multiple Rows into One
(select stuff(
(
select distinct ', ' + rtrim(pak_value)
from e_pstor
where e_pstor.ptype_id = '{55266899-ca35-4690-afaa-9af9b3b98ab2}' /* Code: Pharmacy Supplemental Clinical Rationale */
and e_pstor.source_id = e_note.ct_id
and e_pstor.pak_value > ''
order by ', ' + rtrim(pak_value)
for xml path(''),type).value('.','varchar(max)'),1,1,'')
) AS Pharmacy_Supplemental_Clinical_Rationale_value
@mikaelweave
mikaelweave / javascript_resources.md
Last active August 29, 2015 14:07 — forked from jookyboi/javascript_resources.md
Here are a set of libraries, plugins and guides which may be useful to your Javascript coding.

Libraries

  • jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
  • Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
  • AngularJS - Conventions based MVC framework for HTML5 apps.
  • Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
  • lawnchair - Key/value store adapter for indexdb, localStorage
@mikaelweave
mikaelweave / drop_table_if_exists.sql
Last active November 9, 2017 16:51
Drops a temporary (temp) SQL table if it exists #sql
IF OBJECT_ID('dbo.Scores', 'U') IS NOT NULL DROP TABLE dbo.Scores;