Skip to content

Instantly share code, notes, and snippets.

View yaplex's full-sized avatar

Alex Shapovalov yaplex

View GitHub Profile
<system.webServer>
<rewrite>
<rewriteMaps configSource="rewrite-maps.config" />
<rules>
<rule name="Remove WWW prefix for com domain">
<match url="(.*)" ignoreCase="true" />
<conditions>
<add input="{HTTP_HOST}" pattern="^www\.yaplex\.com" /> </conditions>
<action type="Redirect" url="https://yaplex.com/{R:1}" redirectType="Permanent" /> </rule>
<rule name="Convert to lower case">
USE [DatabaseName]
create table #AuditRequired([TableName] nvarchar(50), [PKName] nvarchar(50))
insert into #AuditRequired values ('User', 'UserId')
insert into #AuditRequired values ('Role', 'RoleId')
insert into #AuditRequired values ('Promotion', 'PromotionId')
Declare @tableName nvarchar(50) = ''
Declare @primaryKeyName nvarchar(50) = ''
# first check what is the origin name for your repository
git remote -v
# remove old origin (you wan't be able to push anymore)
git remote rm origin
# verify than no origin was removed successfuly
git remote -v
# add new origin, add there the url for your new repository
git remote add origin [email protected]:yaplex/my-new-repository.git
# push all code with complete history to new repository
git push origin master
using System.Diagnostics;
using log4net.Appender;
using log4net.Core;
public class AzureAppender : AppenderSkeleton
{
protected override void Append(LoggingEvent loggingEvent)
{
string logString = RenderLoggingEvent(loggingEvent);
$serviceName = "MyService"
if (Get-Service $serviceName -ErrorAction SilentlyContinue)
{
$serviceToRemove = Get-WmiObject -Class Win32_Service -Filter "name='$serviceName'"
$serviceToRemove.delete()
"service removed"
}
else
{
"service does not exists"
# detect current execution directory
$directorypath = Split-Path $MyInvocation.MyCommand.Path
<ul class="nav nav-stacked" data-ng-controller="ProjectListController" >
<li data-ng-repeat="project in projects" data-active-link="">
<a href="#/project/{{project.id}}">{{project.title}}</a>
</li>
</ul>
focusApp.directive('activeLink', function($location) {
var link = function(scope, element, attrs) {
scope.$watch(function() { return $location.path(); },
function(path) {
var url = element.find('a').attr('href');
if (url) {
url = url.substring(1);
}
<pre class="brush: xml; html-script: true">
<ul class="nav nav-stacked" data-ng-controller="ProjectListController" >
<li data-ng-repeat="project in projects">
<a href="#/project/{{project.id}}">{{project.title}}</a></li>
</ul>
</pre>
<?xml version="1.0" encoding="utf-8"?>
<dataConfig xmlns:config="urn:telerik:sitefinity:configuration"
xmlns:type="urn:telerik:sitefinity:configuration:type" config:version="6.1.4300.0" initialized="True"
incrementalGuidRange="0">
<connectionStrings>
<add connectionString="data source=(local);UID=sa;PWD=pwn;initial catalog=sf_DEV" providerName="System.Data.SqlClient" dbType="MsSql"
name="Sitefinity" />
</connectionStrings>
<urlEvaluators>
// some values there ........