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.Diagnostics; | |
| namespace NewsfeedArchiverConsole | |
| { | |
| public class TimeThis : IDisposable | |
| { | |
| private readonly Stopwatch timer; | |
| private readonly Action<string> func; | |
| private readonly string endMessage; |
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.Collections.Generic; | |
| using System.Linq; | |
| using System.Text.RegularExpressions; | |
| namespace CommandLineUtils | |
| { | |
| /// <summary> | |
| /// Arguments class. | |
| /// </summary> | |
| /// <seealso cref="http://www.codeproject.com/Articles/3111/C-NET-Command-Line-Arguments-Parser"/> |
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.Linq; | |
| using System.Reflection; | |
| namespace GetNamespaces | |
| { | |
| class Program | |
| { | |
| static void Main(string[] args) | |
| { |
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
| if (typeof window.janrain !== 'object') window.janrain = {}; | |
| window.janrain.settings = {}; | |
| janrain.settings.appUrl = 'https://yourjanrainurl.rpxnow.com'; | |
| janrain.settings.providers = ["google", "facebook", "linkedin", "live_id", "twitter", "yahoo"]; | |
| var url = document.location.href; | |
| ... |
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.Web; | |
| namespace www.Helper | |
| { | |
| public static class HttpRequestExtensions | |
| { | |
| /// <summary> | |
| /// Extension method to retrieve the site url. | |
| /// e.g. | |
| /// http://localhost:1234/ or |
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.Configuration; | |
| using System.Security.Cryptography; | |
| using System.Text; | |
| namespace SoapServices | |
| { | |
| /// | |
| /// Example class for creating a Password Digest Header in .Net | |
| /// |
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
| dir *.svn /b /A:HD /S > svn-files.txt | |
| for /F "eol=;" %i IN (svn-dirs.txt) DO rmdir %i /q /s |
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
| gci $folder -fil '*.svn' -r -fo | ? {$_.psIsContainer} | ri -fo |
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
| namespace Extensions | |
| { | |
| public static class StringExtensions | |
| { | |
| /// <summary> | |
| /// Check string for repeated characters | |
| /// </summary> | |
| /// <param name="str">string to check (the object being called on)</param> | |
| /// <returns> | |
| /// <c>true</c> if the string has repeated characters otherwise, <c>false</c>. |
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.Text.RegularExpressions; | |
| namespace Extensions | |
| { | |
| public static class StringExtensions | |
| { | |
| /// <summary> | |
| /// Small function to try and strip a bunch of text down to the first | |
| /// number of words, or just return the original string if it is less | |
| /// than that number of words. |
NewerOlder