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
REM Create a project using the AngularJS Template from ServiceStack | |
REM Run it, and make sure it works | |
REM We're going to use Express (i.e.: develop the SPA on a mac in your favorite IDE) | |
REM Copy default.cshtml to index.html for Express to load the home page | |
copy default.cshtml index.html | |
REM Install 3 npm packages to proxy api calls | |
npm install express --save |
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
{%- extends "package.java.template.nunjucks" -%} | |
{%- set templateName = "models/DTO.nunjucks" -%} | |
{%- set subPackage = ".models" -%} | |
{%- import 'macros.java.nunjucks' as macros -%} | |
{% block content %} | |
import java.math.*; | |
import java.util.*; | |
import net.servicestack.client.*; | |
import com.google.gson.annotations.*; |
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
// See here for the following 2 methods: http://stackoverflow.com/questions/703281/getting-path-relative-to-the-current-working-directory | |
/// <summary> | |
/// Gets the relative path ("..\..\to_file_or_dir") of the current file/dir (to) in relation to another (from) | |
/// </summary> | |
/// <param name="to"></param> | |
/// <param name="from"></param> | |
/// <returns></returns> | |
public static string GetRelativePathFrom(this FileSystemInfo to, FileSystemInfo from) |
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
// From: http://stackoverflow.com/questions/627504/what-is-the-best-way-to-recursively-copy-contents-in-c | |
public static void CopyDirectory(DirectoryInfo source, DirectoryInfo target, bool overwrite = true, | |
bool recurse = false, bool throwOnError = true) | |
{ | |
try | |
{ | |
//check if the target directory exists | |
if (Directory.Exists(target.FullName) == false) | |
{ |
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
public static void DeleteDirectory(string path, bool recurse = false) | |
{ | |
try | |
{ | |
if (Directory.Exists(path)) | |
Directory.Delete(path, recurse); | |
} | |
catch (IOException) | |
{ | |
Thread.Sleep(100); |
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 Umbraco and NopCommerce source | |
public static void RestartAppDomain() | |
{ | |
if (GetTrustLevel() > AspNetHostingPermissionLevel.Medium) | |
{ | |
//full trust | |
HttpRuntime.UnloadAppDomain(); | |
TryWriteWebConfig(); |
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
public static bool AreIdenticalPaths(DirectoryInfo dir1, DirectoryInfo dir2) | |
{ | |
return string.Compare( | |
dir1.FullName.TrimEnd('/', '\\'), | |
dir2.FullName.TrimEnd('/', '\\'), | |
StringComparison.InvariantCultureIgnoreCase) == 0; | |
} | |
public static string MapPath(string virtualPath) |
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
var riot = require('riot-compiler'), | |
loaderUtils = require('loader-utils'), | |
fs = require('fs'), | |
path = require('path'); | |
module.exports = function (source) { | |
var content = source; | |
var options = loaderUtils.parseQuery(this.query); |
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
<?xml version = "1.0" encoding="UTF-8"?> | |
<configuration> | |
<!-- PUT THIS FILE INSIDE THE .well-known directory to re-instate static file recognition --> | |
<system.webServer> | |
<staticContent> | |
<mimeMap fileExtension = ".*" mimeType="text/json" /> | |
</staticContent> | |
<handlers> | |
<clear /> | |
<add name="StaticFile" path="*." verb="*" type="" modules="StaticFileModule,DefaultDocumentModule,DirectoryListingModule" scriptProcessor="" resourceType="Either" requireAccess="Read" allowPathInfo="false" preCondition="" responseBufferLimit="4194304" /> |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Web; | |
using System.Text.RegularExpressions; | |
//TODO: probably want to change this if you're using it your project | |
namespace ClothesHorse.Core | |
{ |
OlderNewer