This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT TOP 500 UPPER(REPLACE(REPLACE(user_identity, '@STMARYS.EU', ''), 'ST-MARYS\\', '')) as Online, guid, date FROM hits h INNER JOIN tokens t ON (h.user_guid COLLATE DATABASE_DEFAULT = t.guid COLLATE DATABASE_DEFAULT) WHERE AND t.user_identity NOT like('%_1')AND t.user_identity NOT like('%_2') ORDER BY [date] DESC |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (myReader.Read()) | |
{ | |
while (myReader.Read()) | |
{ | |
DateTime loggedDate = Convert.ToDateTime(myReader["date"].ToString()); | |
if (loggedDate.AddMinutes(5) >= DateTime.Now) | |
{ | |
if (!checkForDup.Contains(myReader["Online"].ToString())) | |
{ | |
if (count < 10) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%@ outputcache duration="10" location="Server" varybyparam="None" %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<br/> | |
<h3>Most recent visitors</h3> | |
<script> | |
(function doPoll() { | |
var count = 0; | |
$.ajax({ | |
url: "http://YOUR_DOMAIN_NAME/plugins/clientaspxfiles/stmwhoonline.aspx", | |
dataType: "json", | |
success: function (json) { | |
var strHtml = '<ul>'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Clear-Host | |
$hsg = Invoke-WebRequest -Uri http://www.stmarys.eu/sitemap.aspx | |
$links = $hsg.Links | Where class -eq 'rmLink' | select href | |
$linksWithDomain = $links | Foreach-Object{"http://www.stmarys.eu/" + $_.href} | |
$linksWithDomain | foreach{ | |
$webClient = new-object System.Net.WebClient | |
$webClient.Headers.Add("user-agent", "PowerShell Script") | |
$output = "" | |
$output = $webClient.DownloadString($_.toString()) | |
if ($output -like "*supportLists*") { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@if (Blog.GetPosts(Blog.PostsPerPage * 2).Count() > Blog.PostsPerPage) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@if (Blog.GetPosts(Blog.PostsPerPage).Count() > Blog.PostsPerPage) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//cdn fallback for Bootstrap css | |
<div id="bootstrapCssTest" class="hide"></div> // (HTML in _Layout.cshtml) | |
if ($('#bootstrapCssTest').is(':visible') === true) { | |
$('<link href="\css/bootstrap.min.css" rel="stylesheet" type="text/css" />').appendTo('head'); | |
} | |
//cdn fallback for Bootstrap js | |
if (typeof ($.fn.modal) === 'undefined') { | |
$('<script src="\scripts/bootstrap.min.js">\x3C/script>').appendTo('head'); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ul class="nav navbar-nav"> | |
<li class="dropdown"> | |
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Recent Articles <b class="caret"></b></a> | |
<ul class="dropdown-menu"> | |
@foreach (var postTitle in Storage.GetAllPosts().Where(pub => pub.IsPublished == true).Where(pubDate => pubDate.PubDate <= DateTime.Now).Take(10)) | |
{ | |
<li><a href="@postTitle.AbsoluteUrl">@postTitle.Title</a></li> | |
} | |
</ul> | |
</li> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get-Mailbox | Get-MailboxPermission | where {$_.user.tostring() -ne "NT AUTHORITY\SELF" -and $_.IsInherited -eq $false} | Select Identity,User,@{Name='Access Rights';Expression={[string]::join(', ', $_.AccessRights)}} | Export-Csv -NoTypeInformation mailboxpermissions.csv |