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
#!/bin/bash | |
echo "Creating persistent Ghost data directory" | |
if [ ! -d "$OPENSHIFT_DATA_DIR/content/data" ]; then | |
mkdir -p $OPENSHIFT_DATA_DIR/content/data | |
fi | |
echo "Creating persistent Ghost images directory" | |
if [ ! -d "$OPENSHIFT_DATA_DIR/content/images" ]; then | |
mkdir -p $OPENSHIFT_DATA_DIR/content/images | |
fi |
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
2013-07-01T10:00:00.000Z |
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 void AddCustomXmlPartToWorkbook() | |
{ | |
var workbook = Globals.ThisAddIn.Application.ActiveWorkbook; | |
const string xmlString = "<?xml version=\"1.0\" encoding=\"utf-8\" ?>" + | |
"<employees xmlns=\"http://myapi.com\">" + | |
"<employee>" + | |
"<name>Karina Leal</name>" + | |
"<hireDate>1999-04-01</hireDate>" + | |
"<title>Manager</title>" + |
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; | |
namespace Example.ExcelAddin | |
{ | |
public partial class ThisAddIn | |
{ | |
[Microsoft.VisualStudio.Tools.Applications.Runtime.Cached()] | |
public String MyCachedData; |
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
Find: | |
^it (.*)$ | |
Replace: | |
it('$1', function(){}); |
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
"use strict"; | |
function fact(start){ | |
var factorial = 1; | |
for (var i = 1; i <= start; i++) | |
{ | |
factorial = factorial * i; | |
} | |
return factorial; | |
} |
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
protected static void FindDescendantsOfType<T>(PageData page, ICollection<T> descendants) where T : class | |
{ | |
var children = DataFactory.Instance.GetChildren(page.PageLink); | |
foreach (var child in children) | |
{ | |
if (child is T) | |
{ | |
descendants.Add(child as T); | |
} | |
FindDescendantsOfType(child, descendants); |
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 a function | |
var BaristaFunction = function(name){ | |
this.myName = name; | |
}; | |
//define a method | |
BaristaFunction.prototype.sayHi = function(){ | |
alert('Hi I\'m ' + this.myName); | |
}; |
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 class LowercaseUrlRewriteProvider : FriendlyUrlRewriteProvider | |
{ | |
public override bool ConvertToExternal(UrlBuilder url, object internalObject, System.Text.Encoding toEncoding) | |
{ | |
base.ConvertToExternal(url, internalObject, toEncoding); | |
url.Path = url.Path.ToLower(); | |
return true; | |
} | |
} |
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 isFrame; | |
try { | |
if (top.location.href !== window.location.href) { | |
isFrame = true; | |
} | |
} catch (e) { | |
// if you're in an iframe in a different domain, the top.location check | |
// results in a security exception | |
isFrame = true; | |
} |