Skip to content

Instantly share code, notes, and snippets.

Christoph ccellar

Block or report user

Report or block ccellar

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View versioninfo.cs
var applicationDetails = FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location);
var applicationName = applicationDetails.ProductName;
var applicationVersion = applicationDetails.ProductVersion;
@ccellar
ccellar / BusDriver.bat
Created Jul 21, 2015
BusDriver Example
View BusDriver.bat
BusDriver.exe move -from:"rabbitmq://user:password@rabbitmqhost/vhost/consumer_error"
-to:"rabbitmq://user:password@rabbitmqhost/vhost/consumer_restore" -count:500
View gist:23ef68403f4382557bfc
[alias]
s = status -sb
last = log -p --max-count=1 --word-diff
co = checkout
standup = log --since yesterday --oneline --author ''
aliases = config --get-regexp alias
amend = commit --amend
bl = blame -w -M -C
branches = branch -rav
changed = status -sb
@ccellar
ccellar / appsettings.cs
Last active Aug 29, 2015
appsettings.cs
View appsettings.cs
var location = Assembly.GetExecutingAssembly().Location;
var directory = Path.GetDirectoryName(location);
var file = Path.Combine(directory, "config.config");
var t = new ExeConfigurationFileMap();
t.ExeConfigFilename = file;
var config = ConfigurationManager.OpenMappedExeConfiguration(t, ConfigurationUserLevel.None);
var value = config.AppSettings.Settings["hello"].Value;
View unpaywall.js
javascript:(function(e,a,g,h,f,c,b,d){
if(!(f=e.jQuery)||g>f.fn.jquery||h(f))
{
c=a.createElement("script");
c.type="text/javascript";
c.src="http://ajax.googleapis.com/ajax/libs/jquery/"+g+"/jquery.min.js";
c.onload=c.onreadystatechange=function(){
if(!b&&(!(d=this.readyState)||d=="loaded"||d=="complete"))
{
h((f=e.jQuery).noConflict(1),b=1);
@ccellar
ccellar / CRM.Redeplyoment.SetupUser.sql
Created Sep 27, 2013
Updates the MSCRM_Config with a new setup user to be able to start a redeployment
View CRM.Redeplyoment.SetupUser.sql
--Source: http://social.microsoft.com/Forums/en-US/crmdeployment/thread/020049fc-d4a3-4570-b70f-6e073f9afdfc
--Listing Users and with their roles
SELECT
SU.DomainName
,SU.SetupUser
,SU.IsDisabled
,SU.AccessMode
,SUR.SystemUserId
,RB.Name [Role]
@ccellar
ccellar / Create-CRM2011Redist.ps1
Created Sep 4, 2013
build a redist folder to install Dynamics CRM 2011 without an internet connection
View Create-CRM2011Redist.ps1
# see http://blogs.msdn.com/b/crminthefield/archive/2013/08/14/use-powershell-build-a-redist-folder-to-install-dynamics-crm-2011-without-an-internet-connection.aspx
#begin Script
#Function to Show an Open Folder Dialog and return the directory selected by the user.
function Read-FolderBrowserDialog([string]$Message, [string]$InitialDirectory)
{
$app = New-Object -ComObject Shell.Application
$folder = $app.BrowseForFolder(0, $Message, 0, $InitialDirectory)
if ($folder) { return $folder.Self.Path } else { return '' }
}
@ccellar
ccellar / select-timezone-infos.sql
Created Apr 12, 2013
This script shows the time zone settings for all users
View select-timezone-infos.sql
select ub.TimeZoneBias, ub.TimeZoneCode, su.DomainName
from UserSettingsBase ub, SystemUser su
where ub.SystemUserId = su.SystemUserId
@ccellar
ccellar / CRM.2011.Restore-Org-On-Same-Deployment.sql
Last active Dec 11, 2015
This script has to be executed on a copy of an organization database which should be restored on the same CRM deployment
View CRM.2011.Restore-Org-On-Same-Deployment.sql
-- Source
-- http://social.microsoft.com/Forums/is/crmdeployment/thread/b8dfb946-bb02-4fb9-a92f-22ffb8b7071c
DECLARE @OldOrganizationId uniqueidentifier, @NewOrganizationId uniqueidentifier
-- The Old OrganizationId
SET @OldOrganizationId = (SELECT TOP(1) OrganizationId FROM OrganizationBase)
-- The New OrganizationId
SET @NewOrganizationId = (SELECT NEWID())
@ccellar
ccellar / missing-indexes.sql
Last active Dec 10, 2015
List database indexes which might be helpful
View missing-indexes.sql
SELECT
migs.avg_total_user_cost * (migs.avg_user_impact / 100.0) * (migs.user_seeks + migs.user_scans) AS improvement_measure,
'CREATE INDEX [missing_index_' + CONVERT (varchar, mig.index_group_handle) + '_' + CONVERT (varchar, mid.index_handle)
+ '_' + LEFT (PARSENAME(mid.statement, 1), 32) + ']'
+ ' ON ' + mid.statement
You can’t perform that action at this time.