⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'html2textile' | |
first_block = <<END | |
<div class="column span-3"> | |
<h3 class="storytitle entry-title" id="post-312"> | |
<a href="http://jystewart.net/process/2007/11/converting-html-to-textile-with-ruby/" rel="bookmark">Converting HTML to Textile with Ruby</a> | |
</h3> | |
<p> | |
<span>23 November 2007</span> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@{ | |
Func<ModelMetadata, bool> ShouldShow = metadata => | |
metadata.ShowForEdit && !ViewData.TemplateInfo.Visited(metadata); | |
} | |
@if (ViewData.TemplateInfo.TemplateDepth > 5) { | |
if (Model == null) { | |
@ViewData.ModelMetadata.NullDisplayText | |
} else { | |
@ViewData.ModelMetadata.SimpleDisplayText | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@inherits PartialViewMacroPage | |
@using Umbraco.Cms.Web | |
@using Umbraco.Cms.Web.Macros | |
@using Umbraco.Framework | |
@{ | |
@* Macro Param: Twitter Username that defaults to umbraco if empty *@ | |
var twitterUsername = String.IsNullOrEmpty(Model.MacroParameters.twitterUsername) ? "umbracoproject" : Model.MacroParameters.twitterUsername; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defaults write org.vim.MacVim MMTextInsetTop '10' | |
defaults write org.vim.MacVim MMTextInsetLeft '10' | |
defaults write org.vim.MacVim MMTextInsetBottom '10' | |
defaults write org.vim.MacVim MMTextInsetRight '10' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.paddypower.financials.market.management.rest.logging; | |
import java.io.BufferedReader; | |
import java.io.ByteArrayInputStream; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.io.InputStreamReader; | |
import javax.servlet.Filter; | |
import javax.servlet.FilterChain; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (window.onorientationchange) { | |
window.onorientationchange = updateOrientation; | |
} else { | |
window.onresize = updateOrientation; | |
} | |
var body = $(document.body); | |
function updateOrientation() { | |
var islandscape = window.orientation != null ? window.orientation != 0 : window.innerWidth > window.innerHeight; | |
body.toggleClass("landscape", islandscape); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Target Name="AfterBuild"> | |
<CallTarget Targets="MinifyJs" /> | |
</Target> | |
<PropertyGroup> | |
<AjaxMin>"C:\Program Files (x86)\Microsoft\Microsoft Ajax Minifier\AjaxMin.exe"</AjaxMin> | |
</PropertyGroup> | |
<Target Name="MinifyJs"> | |
<ItemGroup> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Types> | |
<Type> | |
<Name>System.String</Name> | |
<Members> | |
<ScriptProperty> | |
<Name>ToBase64</Name> | |
<GetScriptBlock> | |
[System.Convert]::ToBase64String([System.Text.Encoding]::Unicode.GetBytes($this)) | |
</GetScriptBlock> | |
</ScriptProperty> |
OlderNewer