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
#r "WebDriver.dll" | |
open OpenQA.Selenium | |
open OpenQA.Selenium.Firefox | |
open OpenQA.Selenium.Chrome | |
use driver = new FirefoxDriver () | |
let nav = driver.Navigate () | |
nav.GoToUrl "http://www.hsr.ch/" |
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
open System | |
open System.Text.RegularExpressions | |
let separator = Regex(@" (?=(?:[^\""]*\""[^\""]*\"")*(?![^\""]*\""))") | |
let split s = separator.Split s | |
let matches = Regex(@"([^\s""\[]\S*|"".*?""|\[.*?\])").Matches | |
let value (m: Match) = m.Value | |
let trim (separator: char) (s: string) = s.Trim separator;; | |
let split s = matches s |> Seq.cast |> Seq.map (value >> trim '"') |> Seq.toList |
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
(* Apache log web tracer *) | |
type Hit = Time * Url * Url; // Url, UrlReferrer | |
type Visit = list of Hit | |
type Entry = IP * Agent * Visit |
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
let sqr x = x * x | |
let sumOfSquaresI nums = | |
let mutable acc = 0.0 | |
for x in nums do | |
acc <- acc + sqr x | |
acc | |
let rec sumOfSquaresF nums = | |
match nums with |
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
^Funktion: (.*?)\n | |
<function>\1</function>\n | |
- Regex style: PERL | |
- Allow escaped chars |
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
#!/bin/bash | |
git filter-branch --force --prune-empty --tree-filter "sort pageranks.txt -o pageranks.txt || true {} \;" | |
git filter-branch --force --prune-empty --tree-filter "find -name "*.xml" -exec sed -i -e 's/us-ascii/utf-8/' {} \;" | |
#if [ -e pageranks.txtx ]; then echo "ok"; fi |
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.Reflection; | |
using System.Collections.Generic; | |
using System.Linq; | |
static class Helper { | |
public static IEnumerable<T> Chain<T>(this T first, Func<T, T> follow) where T : class { | |
for (T item = first; item != null; item = follow(item)) | |
yield return item; | |
} |
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
#!/bin/bash | |
wget \ | |
--restrict-file-names=windows \ | |
--html-extension \ | |
--convert-links \ | |
--page-requisites \ | |
--recursive \ | |
--no-host-directories \ | |
--exclude-directories=UserData,UserData/generated \ |
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; | |
using System.Collections.Generic; | |
namespace Test { | |
enum Set { | |
One = 1, | |
Two = 2, | |
Three = 3 | |
} |
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
<script runat="server"> | |
enum Set { | |
One = 1, | |
Two = 2 | |
} | |
enum ItemOne { | |
One = 1 | |
} |
OlderNewer