Permalink
Browse files

Dumping existing solution (mostly) as-is.

  • Loading branch information...
1 parent c77ce27 commit c3a415bef4178acea119b5ec40010fa49b47f43a @lonekorean committed Dec 7, 2012
Showing with 5,039 additions and 0 deletions.
  1. +18 −0 Extras/Colors.txt
  2. BIN Extras/Mockups/mockup1.psd
  3. BIN Extras/Mockups/mockup2.psd
  4. BIN Extras/Mockups/mockup3.psd
  5. BIN Extras/Mockups/mockup4.psd
  6. BIN Extras/Mockups/mockup5.psd
  7. BIN Extras/Mockups/mockup6.psd
  8. BIN Extras/Mockups/mockup7.psd
  9. +156 −0 Extras/Old Global.txt
  10. BIN Extras/Screenshots/gzip-compression.gif
  11. BIN Extras/Screenshots/mockup1.png
  12. BIN Extras/Screenshots/mockup2.png
  13. BIN Extras/Screenshots/mockup3.png
  14. BIN Extras/Screenshots/mockup4.png
  15. BIN Extras/Screenshots/mockup5.png
  16. BIN Extras/Screenshots/mockup6.png
  17. BIN Extras/Screenshots/mockup7.png
  18. BIN Extras/Screenshots/mockup8.png
  19. BIN Extras/Screenshots/real-time-highlighting.png
  20. BIN Extras/Screenshots/tester-page-new.png
  21. BIN Extras/Screenshots/tester-page-old.png
  22. +20 −0 Extras/Search Rankings.txt
  23. +23 −0 Extras/StaticFile Backup.txt
  24. +549 −0 Extras/blog_template.txt
  25. BIN Extras/button.psd
  26. BIN Extras/button_template.psd
  27. BIN Extras/logo.psd
  28. BIN Extras/match_highlight.psd
  29. BIN Extras/method_button.psd
  30. BIN Extras/mockup7.psd
  31. BIN Extras/mockup8.psd
  32. BIN Extras/nav_divider.psd
  33. BIN Extras/result_tab.psd
  34. BIN Extras/result_tab_template.psd
  35. BIN Extras/search_box.psd
  36. BIN Extras/title.psd
  37. +16 −0 Regex Storm.sln
  38. +79 −0 Website/About.aspx
  39. +45 −0 Website/About.aspx.cs
  40. +24 −0 Website/App_Code/MasterPageBase.cs
  41. +213 −0 Website/App_Code/PageBase.cs
  42. +24 −0 Website/App_Code/UserControlBase.cs
  43. +56 −0 Website/Default.aspx
  44. +39 −0 Website/Default.aspx.cs
  45. +21 −0 Website/DonateFrame.htm
  46. +23 −0 Website/Error.aspx
  47. +37 −0 Website/Error.aspx.cs
  48. +34 −0 Website/Global.asax
  49. BIN Website/Images/Buttons/donate_via_paypal.png
  50. BIN Website/Images/Buttons/run_regex.png
  51. BIN Website/Images/Icons/Large/about.png
  52. BIN Website/Images/Icons/Large/blog.png
  53. BIN Website/Images/Icons/Large/contact.png
  54. BIN Website/Images/Icons/Large/info.png
  55. BIN Website/Images/Icons/Large/pages.png
  56. BIN Website/Images/Icons/Large/reference.png
  57. BIN Website/Images/Icons/Large/tester.png
  58. BIN Website/Images/Icons/bullet_toggle_minus.png
  59. BIN Website/Images/Icons/bullet_toggle_plus.png
  60. BIN Website/Images/Icons/context.png
  61. BIN Website/Images/Icons/error.png
  62. BIN Website/Images/Icons/go.png
  63. BIN Website/Images/Icons/info.png
  64. BIN Website/Images/Icons/list.png
  65. BIN Website/Images/Icons/permalink.png
  66. BIN Website/Images/Icons/reference.png
  67. BIN Website/Images/Icons/storm.png
  68. BIN Website/Images/Icons/table.png
  69. BIN Website/Images/Titles/about.png
  70. BIN Website/Images/Titles/page_not_found.png
  71. BIN Website/Images/Titles/regex_reference.png
  72. BIN Website/Images/Titles/regex_tester.png
  73. BIN Website/Images/Titles/something_terribly_wrong.png
  74. BIN Website/Images/body_back.gif
  75. BIN Website/Images/detail_tab_back.png
  76. BIN Website/Images/dot_net.png
  77. BIN Website/Images/footer_fade.png
  78. BIN Website/Images/footer_leaves.png
  79. BIN Website/Images/header_back.png
  80. BIN Website/Images/input_fade.png
  81. BIN Website/Images/loading.gif
  82. BIN Website/Images/main_back.png
  83. BIN Website/Images/match_highlight_back.gif
  84. BIN Website/Images/nav_divider.gif
  85. BIN Website/Images/pixel-cccccc.gif
  86. BIN Website/Images/rabbits.jpg
  87. BIN Website/Images/regex_storm.png
  88. BIN Website/Images/rounded_input_left.png
  89. BIN Website/Images/rounded_input_right.png
  90. BIN Website/Images/sheet_bottom.png
  91. BIN Website/Images/sheet_fade.png
  92. BIN Website/Images/sheet_mid.png
  93. BIN Website/Images/sheet_top.png
  94. BIN Website/Images/table_header_back.gif
  95. BIN Website/Images/transparent.gif
  96. BIN Website/Images/welcome.png
  97. +104 −0 Website/Javascripts/Reference.js
  98. +464 −0 Website/Javascripts/Tester.js
  99. +96 −0 Website/MasterPages/Standard.master
  100. +72 −0 Website/MasterPages/Standard.master.cs
  101. +23 −0 Website/NotFound.aspx
  102. +38 −0 Website/NotFound.aspx.cs
  103. +39 −0 Website/Reference.aspx
  104. +177 −0 Website/Reference.aspx.cs
  105. +20 −0 Website/Stylesheets/About.css
  106. +287 −0 Website/Stylesheets/Base.css
  107. +94 −0 Website/Stylesheets/Default.css
  108. +127 −0 Website/Stylesheets/Reference.css
  109. +630 −0 Website/Stylesheets/Tester.css
  110. +15 −0 Website/Stylesheets/TesterFixes/firefox-3.0.css
  111. +13 −0 Website/Stylesheets/TesterFixes/firefox-all.css
  112. +6 −0 Website/Stylesheets/TesterFixes/ie-7.x.css
  113. +6 −0 Website/Stylesheets/TesterFixes/safari-all.css
  114. +235 −0 Website/Tester.aspx
  115. +849 −0 Website/Tester.aspx.cs
  116. +22 −0 Website/UserControls/ReferenceTable.ascx
  117. +220 −0 Website/UserControls/ReferenceTable.ascx.cs
  118. BIN Website/favicon.ico
  119. +125 −0 Website/web.config
View
@@ -0,0 +1,18 @@
+007ebd main blue header color bottom
+5cb4f7 lighter blue header color top
+e0ecf1 lightest blue highlighted matches in context
+5c8f4d green buttons top
+
+a5d6f0 light blue odd
+c1e044 light green even (and active nav)
+
+f7f7f7 input background
+f2f2f2 alt row background
+e2e2e2 page background
+cccccc default borders
+999999 table header row
+666666 main panel border
+464646 footer pages link highlight
+3f3f3f footer background
+333333 default text
+2e2e2e nav bar background
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
@@ -0,0 +1,156 @@
+<%@ Application Language="C#" %>
+<%@ Import Namespace="System.Collections.Generic" %>
+
+<script runat="server">
+
+ void Application_BeginRequest(object sender, EventArgs e)
+ {
+ Uri currentUrl = null;
+ //if (Request.Url.AbsolutePath == "/NotFound.aspx" && Request.Url.Query.StartsWith("?404;"))
+ //{
+ // // this is a 404 call in prod (example, http://regexstorm.net/NotFound.aspx?404;http://regexstorm.net:80/tester?this=that)
+ // // extract the original url from the query string, remove the port, and use it as the current url
+ // string url = Request.Url.Query.Substring(5);
+ // url = url.Remove(url.IndexOf(":80"), 3);
+ // currentUrl = new Uri(url);
+ //}
+ //else
+ //{
+ // just a normal page request, use the true current url
+ currentUrl = Request.Url;
+ //}
+
+ //ConsolidateVariants(currentUrl);
+ //RedirectUrl(currentUrl);
+ //RewriteUrl(currentUrl);
+ }
+
+ private void ConsolidateVariants(Uri currentUrl)
+ {
+ // start with current url
+ UriBuilder redirectUrl = new UriBuilder(currentUrl);
+
+ // variant host strings (example, www.regexstorm.com) are consolidated to regexstorm.net
+ if (currentUrl.DnsSafeHost != "regexstorm.net" && currentUrl.DnsSafeHost != "localhost")
+ {
+ // modify host
+ redirectUrl.Host = "regexstorm.net";
+
+ // if the path contains default.aspx, remove it before redirecting
+ redirectUrl.Path = Regex.Replace(redirectUrl.Path, "/default.aspx$", "/");
+ }
+
+ // remove trailing / for directories (example, http://regexstorm.net/tester/)
+ if (currentUrl.AbsolutePath.EndsWith("/"))
+ {
+ redirectUrl.Path = redirectUrl.Path.TrimEnd('/');
+ }
+
+ // if anything on the redirect url was changed, then a redirect is due
+ if (redirectUrl.Uri.ToString() != currentUrl.ToString())
+ {
+ // permanently redirect to new url
+ Response.AddHeader("Location", redirectUrl.Uri.ToString());
+ Response.StatusCode = 301;
+ Response.End();
+ }
+
+ }
+
+ private void RedirectUrl(Uri currentUrl)
+ {
+ // there's an extra app directory in dev, which affects path logic
+ bool isDev = (currentUrl.DnsSafeHost == "localhost");
+
+ // determine app relative path
+ string appRelativePath = currentUrl.AbsolutePath.ToLower();
+ if (isDev)
+ {
+ // remove app directory
+ appRelativePath = Regex.Replace(appRelativePath, "^" + Request.ApplicationPath, "", RegexOptions.IgnoreCase);
+ }
+
+ // run through all cases where we want to redirect
+ UriBuilder redirectUrl = new UriBuilder(currentUrl);
+ switch (appRelativePath)
+ {
+ case "/tester.aspx":
+ redirectUrl.Path = "/tester";
+ break;
+ case "/reference.aspx":
+ redirectUrl.Path = "/reference";
+ break;
+ case "/about.aspx":
+ redirectUrl.Path = "/about";
+ break;
+ }
+
+ // if anything on the redirect url was changed, then a redirect is due
+ if (redirectUrl.Uri.ToString() != currentUrl.ToString())
+ {
+ if (isDev)
+ {
+ // put the app directory back in when in dev
+ redirectUrl.Path = Request.ApplicationPath + redirectUrl.Path;
+ }
+
+ // permanently redirect to new url
+ Response.AddHeader("Location", redirectUrl.ToString());
+ Response.StatusCode = 301;
+ Response.End();
+ }
+ }
+
+ private void RewriteUrl(Uri currentUrl)
+ {
+ // only rewrite a url if it's to a folder (no file extension)
+ if(!currentUrl.AbsolutePath.Contains(".")){
+ // get path segments array and toss the first segment (the root /)
+ List<string> segments = new List<string>(currentUrl.Segments);
+ segments.RemoveAt(0);
+
+ // in dev, the next segment is the app (Website) directory, which we can also toss
+ if (currentUrl.DnsSafeHost == "localhost")
+ {
+ segments.RemoveAt(0);
+ }
+
+ // only continue if there are segments left (directory default urls will end here)
+ if (segments.Count > 0)
+ {
+ // do some massaging on each segment (remove trailing / and make lowercase)
+ for (int i = 0; i < segments.Count; i++)
+ {
+ segments[i] = segments[i].TrimEnd('/').ToLower();
+ }
+
+ // alright, now we're ready for actual rewriting logic
+ string rewrittenPath = null;
+
+ if (segments.Count == 1)
+ {
+ // single directory rewrites
+ switch (segments[0])
+ {
+ case "tester":
+ rewrittenPath = "~/Tester.aspx";
+ break;
+ case "reference":
+ rewrittenPath = "~/Reference.aspx";
+ break;
+ case "about":
+ rewrittenPath = "~/About.aspx";
+ break;
+ }
+ }
+
+ if (!string.IsNullOrEmpty(rewrittenPath))
+ {
+ // execute rewrite, passing current query string along
+ HttpContext.Current.RewritePath(rewrittenPath, "", currentUrl.Query.TrimStart('?'), true);
+ }
+ }
+ }
+ }
+
+</script>
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -0,0 +1,20 @@
+Search rankings!
+
+1/2/2010
+".net regex tester" - page 22
+"regex tester" - page 31
+
+1/4/2010
+".net regex tester" - page 21
+"regex tester" - page 31
+
+1/5/2010
+(site gone for both searches!)
+
+1/6/2010
+".net regex tester" - page 5
+"regex tester" - page - page 22
+
+1/9/2010
+".net regex tester" - page 6
+"regex tester" - page 24
@@ -0,0 +1,23 @@
+Edit Module Mapping
+Request path: *
+Module: StaticFileModule,DefaultDocumentModule,DirectoryListingModule
+Executable: (empty)
+Name: StaticFile
+
+File or Folder
+
+
+
+
+
+
+
+%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll
+
+
+File path for 404 error:
+%SystemDrive%\inetpub\custerr
+\<LANGUAGE-TAG>\
+404.htm
+
+(checkbox clicked)
Oops, something went wrong.

0 comments on commit c3a415b

Please sign in to comment.