create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "[email protected]"
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "[email protected]"
| <Project | |
| xmlns="http://schemas.microsoft.com/developer/msbuild/2003" | |
| ToolsVersion="4.0" | |
| DefaultTargets="Demo" > | |
| <Target Name="Demo"> | |
| <PropertyGroup> | |
| <CurrentDate>$([System.DateTime]::Now.ToString(yyyyMMdd-mmss))</CurrentDate> | |
| </PropertyGroup> |
| # | |
| # Powershell script for adding/removing/showing entries to the hosts file. | |
| # | |
| # Known limitations: | |
| # - does not handle entries with comments afterwards ("<ip> <host> # comment") | |
| # | |
| $file = "C:\Windows\System32\drivers\etc\hosts" | |
| function add-host([string]$filename, [string]$ip, [string]$hostname) { |
| @{ | |
| var root = CurrentPage.AncestorsOrSelf(1).First(); | |
| var url = umbraco.library.NiceUrl(root.Id); | |
| var withDomain = umbraco.library.NiceUrlWithDomain(root.Id); | |
| } |
Sublime Text 2 ships with a CLI called subl (why not "sublime", go figure). This utility is hidden in the following folder (assuming you installed Sublime in /Applications like normal folk. If this following line opens Sublime Text for you, then bingo, you're ready.
open /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl
You can find more (official) details about subl here: http://www.sublimetext.com/docs/2/osx_command_line.html
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Linq.Expressions; | |
| using System.Text.RegularExpressions; | |
| using System.Web.Mvc; | |
| using System.Web.Mvc.Html; | |
| namespace System.Web.Mvc.Html | |
| { |
| public class ImportedFilePathResolver : IPathResolver | |
| { | |
| private string currentFileDirectory; | |
| private string currentFilePath; | |
| /// <summary> | |
| /// Initializes a new instance of the <see cref="ImportedFilePathResolver"/> class. | |
| /// </summary> | |
| /// <param name="currentFilePath">The path to the currently processed file.</param> | |
| public ImportedFilePathResolver(string currentFilePath) |
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
| <!-- | |
| Usage: | |
| 1. Download this file into your project folder, named it as "Less.targets" | |
| 2. Use notepad to open your project file (e.g. Example.csproj), and put following code to above of end element 'Project'. | |
| <Import Project="Less.targets" /> | |
| 3. Change element type of *.less file in your project file to "LessCompile". | |
| You need to do that manual first time. After that, you can change the file's "build action" to 'LessCompile' through PropertyGrid. | |
| 4. Close notepad and reload your project in VisualStudio. Then press F6 to build your project. | |
| You will found the css file will be generated by build process automatically. | |
| --> |
| /// <summary> | |
| /// Verifies the controller action, contains an attribute of the specified attributeType. | |
| /// </summary> | |
| /// <param name="controller">The controller.</param> | |
| /// <param name="action">The action method.</param> | |
| /// <param name="attributeType">Type of the attribute to look for.</param> | |
| /// <returns>Returns true if the attribute was present on the action. Otherwise false.</returns> | |
| public static bool VerifyControllerActionAttribute(this Controller controller, Func<ActionResult> action, Type attributeType) | |
| { | |
| MethodInfo methodInfo = action.Method; |