Skip to content

Instantly share code, notes, and snippets.

View torleifhalseth's full-sized avatar

Torleif Halseth torleifhalseth

View GitHub Profile
@torleifhalseth
torleifhalseth / SassMeister-input-HTML.html
Created April 15, 2015 06:58
Grid with static gutter using outer container padding
<div class="modules">
<div class="module_container">
<div class="module"></div>
</div>
<div class="module_container">
<div class="module"></div>
</div>
<div class="module_container">
<div class="module"></div>
</div>

###Managing Database Logins -- first, connect to the master database ####Create Login

CREATE LOGIN login1 WITH password='<ProvidePassword>';

Strong Password Generator

####Create User Remember to run the queries below on the actual database (Right click the database and select "New Query")

@torleifhalseth
torleifhalseth / Replacing uHydrator with Ditto.md
Last active March 24, 2017 09:48
uHydrator to Ditto regex replacement thingy

Add the patterns to the find and replace dialog in Visual Studio for ultimate win. Replace in entire solution for more ultimate win.

#Matching pattern

_?ModelFactory\.Create<([a-z]+)>\((_?[a-z]+\.?[a-z]+?)\)

#Replacement pattern

@torleifhalseth
torleifhalseth / gist:7ea1e95b54ccf102b75b
Last active August 29, 2015 13:57
Mapping Umbraco content to Strongly typed models

###Mapping Umbraco content to Strongly typed models

Every document type in Umbraco should be reflected in a strongly typed model. Example:Article(Document type) --> ArticleModel(Strongly typed model)

Heritage in Umbraco document types should be reflected in our models.

Every view should have an assigned View Model.
Every View Model should inherit from a common view model (CommonViewModel). The common view model should contain global properties.