Skip to content

Instantly share code, notes, and snippets.

@aburok
aburok / remove_transforms.ps1
Created May 30, 2018 12:11
Umbraco Config Transforms remove transforms Powershell
# $configPrefixes = @( "web", "connectionStrings", "ExamineSettings" )
$configurations = @( "Dev", "Staging", "Client-Staging", "Pre-Prod", "Live")
$configName = $configurations | ForEach-Object { "*.$_.config" }
$configTransforms = Get-ChildItem .\ `
-Include $configName `
-Recurse
$configTransforms | ForEach-Object {
@aburok
aburok / licenses.ps1
Created May 30, 2018 12:10
Umbraco Powershell copy license files
# $configPrefixes = @( "web", "connectionStrings", "ExamineSettings" )
$licenses = @( "umbracoCourierExpress.lic", "umbracoForms.lic")
$licenses | ForEach-Object {
Write-Output "Copying license files configuration transform file: $($_.FullName)"
Copy-Item ".\Licenses\$_" -Destination ".\bin" -Verbose
}
$licenses | ForEach-Object {
@aburok
aburok / query_properties.sql
Created May 30, 2018 12:09
Umbraco SQL query document types with properties
/****** Script for SelectTopNRows command from SSMS ******/
SELECT TOP 1000
ct.pk,
ct.alias as 'Content Type Alias',
ct.icon as 'Content Type Icon',
pt.alias as 'Property Alias',
pt.Name as 'Property Name',
data.propertyEditorAlias as 'Property Editor',
data.dbType as 'Property DB Type',
t.alias as 'Template Alias'
@aburok
aburok / create_user.sql
Created May 30, 2018 12:08
Umbraco Azure SQL create user
-- =================================================
-- Create User as DBO template for Windows Azure SQL Database
-- =================================================
-- For login <login_name, sysname, login_name>, create a user in the database
-- EXECUTE THIS ON AZURE MASTER DATABASE
CREATE LOGIN [client-stg-umbraco-user] WITH password='xxx';
GO
@aburok
aburok / notification_query.sql
Created May 30, 2018 12:05
Umbraco user notification SQL Query
-- Select all notifications for user
SELECT TOP 1000
uu.userName,
uu.userEmail,
[userId],
cd.[nodeId],
cd.text,
cd.published,
cd.updateDate,
[action]
@aburok
aburok / SQLTables.sql
Created February 22, 2017 15:49
Generate c# const string class with SQL Server table and column names
<#@ template debug="false" hostspecific="false" language="C#" #>
<#@ assembly name="System.Core" #>
<#@ import namespace="System.Linq" #>
<#@ import namespace="System.Text" #>
<#@ import namespace="System.Collections.Generic" #>
<#@ output extension=".cs" #>
<#@ assembly name = "Microsoft.CSharp" #>
<#@ assembly name = "System.Data" #>
<#@ import namespace = "System.Dynamic" #>
<#@ import namespace = "System.Data.SqlClient" #>
@aburok
aburok / koparka
Created December 26, 2015 08:29
sketchyphysics koparka model
if frame < 1.00
@SlideBase = 1.00
@SlideBaseStep = 0.01
@RotBase = 0.5
@RotBaseStep = 0.002
@SliderArm1 = 1
@SliderArm1Step = 0.01
@aburok
aburok / _vimrc
Last active September 20, 2016 04:45
Vim common configuration for GVim and VsVim
augroup filetype_vim
autocmd!
autocmd FileType vim setlocal foldmethod=marker
augroup END
" Vim ESCAPE Combinations{{{
imap jj <esc>
imap <S-Space> <Esc>
vnoremap <S-Space> <Esc>
" }}}
@aburok
aburok / _vsvimrc
Last active August 22, 2023 05:57
Visual Studio VsVim configuration file
" Ctrl + Alt + I - ReSharper generate file beside
" Ctrl + Alt + S - Resharper surrand with template
" File {{{
nmap zX :vsc Edit.UndoClose<CR>
nnoremap Q :vsc File.SaveSelectedItems<CR> :vsc File.Close<CR>
" }}}
" Build {{{
@aburok
aburok / vs_code_colors
Last active August 29, 2015 14:18
Visual Studio code colors
<UserSettings>
<ApplicationIdentity version="11.0"/>
<ToolsOptions>
<ToolsOptionsCategory name="Environment" RegisteredName="Environment"/>
</ToolsOptions>
<Category name="Environment_Group" RegisteredName="Environment_Group">
<Category name="Environment_FontsAndColors" Category="{1EDA5DD4-927A-43a7-810E-7FD247D0DA1D}" Package="{DA9FB551-C724-11d0-AE1F-00A0C90FFFC3}" RegisteredName="Environment_FontsAndColors" PackageName="Visual Studio Environment Package">
<PropertyValue name="Version">2</PropertyValue>
<FontsAndColors Version="2.0">
<Categories>