$/
docs/
src/
tests/
samples/
artifacts/
packages/
build/
lib/
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
public static bool Like(this string @string, string pattern, char wildcard = '%', bool ignoreCase = true) | |
{ | |
pattern = pattern.Replace(wildcard.ToString(), ".*"); | |
var options = RegexOptions.Singleline | RegexOptions.Compiled; | |
if (ignoreCase) options |= RegexOptions.IgnoreCase; | |
var regex = new Regex(pattern, options); | |
return regex.IsMatch(@string); |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Security; | |
using System.Web; | |
using System.Web.Hosting; | |
namespace PdfGenerator | |
{ | |
public class PdfGenerator |
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
<!-- https://coderwall.com/p/mycbiq --> | |
<configuration> | |
<system.webServer> | |
<rewrite> | |
<rules> | |
<rule name="Main Rule" stopProcessing="true"> | |
<match url=".*" /> | |
<conditions logicalGrouping="MatchAll"> | |
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> | |
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> |
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
# Executes an IDbCommand and converts the resultset | |
# to a Powershell object collection | |
function ExecuteCommand( | |
$command = { throw 'Command must be supplied' } | |
){ | |
$rows = @(); | |
$reader = $command.executereader() | |
while($reader.read()){ | |
$values = new-object object; | |
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
@echo off | |
: make-alias.cmd | |
if "%1" == "" goto usage: | |
for /F "usebackq" %%v in (`"powershell $M = ipmo -PassThru "%1" ; $M.ExportedCommands.Keys"`) do doskey %%v=powershell ipmo "%1" ; %%v $* | |
echo Aliases: | |
doskey /macros | |
goto done |
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 python | |
# -*- coding: utf-8 -*- | |
""" | |
In Flipboard's article[1], they kindly divulge their interpretation | |
of the summarization technique called LexRank[2]. | |
While reading Flipboard's article, you can, if followed point by point, | |
reimplement their summarization algorithm. | |
Here are the steps/excerpts that stood out to me: |
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
/// Markov chain that learns by observing data. | |
/// Let it observe a sequence of states. | |
/// Then you can ask it, given a state, | |
/// what are the probabilities of the next states occuring? | |
type MarkovChain (numStates : int) = | |
let mutable numObservations = 0 | |
let mutable lastState = 0 | |
let mutable matrix = Array2D.create numStates numStates (0, 0) |
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
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions | |
Enable-RemoteDesktop | |
cinst git | |
choco install powershell | |
choco install sysinternals | |
cinst googlechrome | |
cinst 7zip.install | |
choco install nodejs.install | |
choco install ruby |
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
<?xml version="1.0" encoding="utf-8" ?> | |
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"> | |
<CodeSnippet Format="1.0.0"> | |
<Header> | |
<Title>Rx ObservableAsPropertyHelper</Title> | |
<Shortcut>rxOAPH</Shortcut> | |
<Description>Code snippet for a ReactiveUI ObservableAsPropertyHelper</Description> | |
<SnippetTypes> | |
<SnippetType>Expansion</SnippetType> | |
</SnippetTypes> |
OlderNewer