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
// A browser console-ready conversion of NCSU's bookmarlet. See http://accessibility.oit.ncsu.edu/tools/web-evaluation-tools/ | |
var yourURL=(window.location.protocol=='http:'?'http://webapps.ncsu.edu/web-evaluation-tools/web-evaluation-tools.php':'https://webapps.ncsu.edu/web-evaluation-tools/web-evaluation-tools.php'); | |
function getScript(url,success){ | |
var script=document.createElement('script');script.src=url; | |
var head=document.getElementsByTagName('head')[0],done=false; | |
script.onload=script.onreadystatechange=function(){if(!done&&(!this.readyState||this.readyState=='loaded'||this.readyState=='complete')){ | |
done=true;success();script.onload=script.onreadystatechange=null;head.removeChild(script); | |
} | |
}; | |
head.appendChild(script); |
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
Option Compare Database | |
Option Explicit | |
' Dumps connection data for all ODBC/linked tables. | |
Function DumpConnectionData() As Boolean | |
Dim db As DAO.Database | |
Dim tb As DAO.TableDef | |
Set db = CurrentDb | |
For Each tb In db.TableDefs |
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
protected void AddProgram(Sitecore.Data.Items.Item program) | |
{ | |
HtmlGenericControl listItem = new HtmlGenericControl("li"); | |
HtmlAnchor listLink = new HtmlAnchor(); | |
listLink.InnerText = program.DisplayName; | |
listLink.HRef = Sitecore.Links.LinkManager.GetItemUrl(program).ToLowerInvariant(); | |
listItem.Controls.Add(listLink); | |
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
use XXX_Sitecore_Master | |
select f.ItemId, f.Value, f.Created, f.Updated, i.Name | |
from VersionedFields f | |
left join Items i on f.ItemId = i.ID | |
where f.Value like '<r owner%' | |
order by f.Value |
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
use aspnetdb | |
exec sp_spaceused elmah_error |
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
use XXX_Sitecore_Web | |
select top 100 h.Action, h.Category, h.ItemId, h.ItemVersion, h.ItemPath, h.UserName, h.Created | |
--select count(*) | |
from History h | |
where UserName = 'user' | |
and Created <= '2014-04-11 17:11:36.870' | |
and Created >= '2014-04-11 17:00:59.963' | |
-- Created and Deleted items are potentially disruptive changes. The rest could be bad, but ... | |
and h.Action in ('Created', 'Deleted') |
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
fast://*[@__Renderings='%{FAAD00AE-A089-4AEF-989C-73917660FF48}%'] |
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
// query against XXX_Sitecore_Core | |
var adminUsers = from profile in Aspnet_Profiles | |
join user in Aspnet_Users on profile.UserId equals user.UserId | |
where profile.PropertyNames.Contains("Administrator") | |
&& profile.PropertyValuesString.Contains("True") | |
select new { Profile = profile, User = user } | |
; | |
adminUsers | |
.OrderBy (u => u.User.LastActivityDate) |
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
# start where you want the project directory to be created | |
# create a new directory for an application. pass -B to skip adding bundles (requires internet connection) | |
rails new application_name | |
# start in main project directory | |
# must run commands for a project out of bin directory | |
cd bin | |
# start Rails WEBrick server (on port 3000). ctrl + c will kill it | |
rails server | |
# create a new scaffold (object and CRUD) |
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
# run as administrator | |
# if you haven't already, execution policy will need to be relaxed. This probably returns Restricted | |
Get-ExecutionPolicy | |
# switch to a lax policy | |
Set-ExecutionPolicy Unrestricted | |
# install Chocolatey | |
iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1')) |
OlderNewer