This file contains 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
// http://haacked.com/archive/2009/01/04/fun-with-named-formats-string-parsing-and-edge-cases.aspx#70316 | |
using System; | |
using System.Collections.Generic; | |
using System.Text.RegularExpressions; | |
using System.Web.UI; | |
namespace StringLib | |
{ | |
using System.Web; |
This file contains 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
/** | |
Copyright (c) 2009 Open Lab, http://www.open-lab.com/ | |
Permission is hereby granted, free of charge, to any person obtaining | |
a copy of this software and associated documentation files (the | |
"Software"), to deal in the Software without restriction, including | |
without limitation the rights to use, copy, modify, merge, publish, | |
distribute, sublicense, and/or sell copies of the Software, and to | |
permit persons to whom the Software is furnished to do so, subject to | |
the following conditions: | |
This file contains 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
// based on http://emptysquare.net/blog/adding-an-include-tag-to-underscore-js-templates/ | |
// include tag for underscore templates | |
// <% include template-id %> | |
var _underscore_template = _.template; | |
_.template = function(str, data) { | |
// match "<% include template-id %>" | |
return _underscore_template( | |
str.replace( | |
/<%\s*include\s*(.*?)\s*%>/g, |
This file contains 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
#!/usr/bin/env bash | |
set -eu | |
## The Godeps file is expected to have lines like so: | |
# | |
# github.com/nu7hatch/gotrail v2.6 | |
# | |
## where the first element is the import path and the second is a tag | |
## or commit SHA in the project. |