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
define(['services/module', 'underscore'], function (module, _) { | |
'use strict'; | |
function OrderResource($http, $q, link) { | |
// ... other functions removed: viewState, accessState, flattenResource | |
// viewState is a deeper resource | |
// accessState looks at the Accept headers | |
// flattenResource: flattens all of this for the client-side resource (in-memory model bound to view) |
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
/* | |
* Adapted from https://raw.github.com/geb/geb-seconf-2012-slides/master/buildSrc/pegdown/src/main/groovy/org/gradle/plugins/pegdown/PegDown.groovy | |
*/ | |
buildscript { | |
repositories { | |
mavenCentral() | |
} | |
dependencies { |
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
<NotepadPlus> | |
<UserLang name="Gradle" ext="gradle"> | |
<Settings> | |
<Global caseIgnored="yes" /> | |
<TreatAsSymbol comment="yes" commentLine="yes" /> | |
<Prefix words1="no" words2="no" words3="no" words4="no" /> | |
</Settings> | |
<KeywordLists> | |
<Keywords name="Delimiters">"'0"'0</Keywords> | |
<Keywords name="Folder+"></Keywords> |
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
/* | |
task changeLog(type: ReleaseNotes){ | |
destFile file("CHANGELOG-DJANGO-SAMPLE") | |
url "http://django-page-cms.googlecode.com/svn/trunk/" | |
} | |
# gradle changeLog | |
Creates output (first entry only shown): |
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
/** | |
* An extension that always calls success when a spy is called. | |
* | |
* @example | |
* spyOn(foo, 'bar').andCallSuccessWith("baz"); | |
* var options = { | |
* success: jasmine.createSpy(); | |
* } | |
* foo.bar(options); | |
* expect(options.success).toBeCalledWith("baz"); |
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
class teamcity { | |
@package{ [ "java-1.6.0-openjdk", "wget", "tar", "gzip" ]: | |
ensure => installed, | |
} | |
$src="http://download.jetbrains.com/teamcity/TeamCity-7.0.tar.gz" | |
$username="teamcity" | |
$installdir="/opt" |
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
/** | |
* @license Copyright (c) 2012, toddb GoneOpen Limited. | |
* Available via the MIT or new BSD license. | |
* based on https://gist.github.com/966776 (mathieul) and forked to https://gist.github.com/1474205 | |
* jasmine.requirejs() returns a function that will load the file(s) required | |
* and will wait until it's done before proceeding with running specs. | |
* The function returned is intended to be passed to beforeEach() so the file(s) | |
* is(are) loaded before running each spec. | |
* |
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
Property { | |
$domain = "" | |
} | |
Task Hostfile-Update -Description "Add new sites to the host file" { | |
$host_file = "$env:windir\System32\drivers\etc\hosts" | |
if ((Get-Content $host_file | ForEach-Object{$_ -eq "127.0.0.1 $domain "}) -notcontains "True") | |
{ | |
Add-Content $host_file "`n127.0.0.1 $domain " | |
} |
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
Task Db-Setup -Description "Adds the current user for access to SharePoint schemas - DEV only" { | |
$userToAdd = Read-Host -Prompt 'User to add to Farm Admin group <DOMAIN>\<USERNAME>' | |
$db_env = Read-Host -Prompt 'Environment suffix of the database to setup' | |
Write-Host "If this script has a problem then you don't have login access - please sort this out first" | |
Write-Host "see http://www.sharepointassist.com/2010/01/29/the-local-farm-is-not-accessible-cmdlets-with-featuredependencyid-are-not-registered/" | |
$whoami = [Environment]::UserName | |
Write-Host "Adding dev user to database: $whoami" | |
Write-Host "Enter the password for the user $site_owner" | |
exec { sqlcmd -i .\dev-powershell-access.sql -U $whoami -v user=$userToAdd -v db_env=$db_env } |
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
Properties { | |
$site_owner = "domain\serviceaccount" | |
$ca_port = 3456 | |
} | |
Task AdminUser-Setup -Depends Solution-Setup -Description "Sets the current user as a farm admin on current computer" { | |
Add-PsSnapin Microsoft.SharePoint.PowerShell -ErrorAction "SilentlyContinue" | |
$whoami = [Security.Principal.WindowsIdentity]::GetCurrent().Name | |
Write-Host "You are logged in as $whoami" | |
NewerOlder