# create a solution
dotnet new sln
dotnet new console -lang f# -o src/Kraken
dotnet remove src/Kraken/Kraken.fsproj package Microsoft.FSharp.Core.netcore
dotnet add src/Kraken/Kraken.fsproj package FSharp.Core
dotnet add src/Kraken/Kraken.fsproj package MongoDB.Driver.GridFS
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"?> | |
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> | |
<xsl:output method="html" indent="yes" doctype-system="about:legacy-compat"/> | |
<xsl:template match="/"> | |
<html> | |
<body> | |
<h1>Statistics</h1> | |
<p>Total codebase size: <xsl:value-of select="//CodebaseCost"/></p> | |
<p>Code to analyze: <xsl:value-of select="//TotalDuplicatesCost"/></p> | |
<p>Total size of duplicated fragments: <xsl:value-of select="//CodebaseCost" /></p> |
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
pushd "C:/Projects/Software/Dev/" | |
"C:\Tools\jb-commandline-8.0.0.39\dupfinder.exe" /idle-priority /show-stats /show-text /debug /normalize-types /exclude-code-regions="Windows Form Designer generated code;Component Designer generated code" /o="dupfinder.%date%.xml" /e="**/*.Designer.cs;**/*.generated.cs;**/Model.cs;**/Reference.cs" "C:/Projects/Software/Dev/SolutionName.sln" | |
popd |
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 | |
NAME=myprog | |
TEMPLATE=console | |
# create solution file | |
dotnet new sln -n $NAME | |
# create console project | |
dotnet new console -lang F# -n $NAME -o src/$NAME |
720p -> H.264 (x264) video + AAC 128kbps audio:
ffmpeg -i 00001.MTS -threads 3 -y -vcodec libx264 -sameq -acodec libfaac -ab 128k -ar 44100 -ac 2 -s 1280x720 -vpre normal -b 1M output.mp4
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
import cats._ | |
import cats.implicits._ | |
import doobie._ | |
import doobie.implicits._ | |
def setIntOpt(n: Int, v: Option[Int]): PreparedStatementIO[Unit] = | |
v match { | |
case None => FPS.setNull(n, java.sql.Types.INTEGER) | |
case Some(s) => FPS.setInt(n, s) | |
} |
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
syntax on | |
set expandtab | |
set smarttab | |
set shiftwidth=4 | |
set tabstop=4 | |
set smartindent | |
set ignorecase | |
set nohlsearch | |
set incsearch | |
set smartcase |
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
[alias] | |
# view list of merged feature branches | |
lscleanup = "!git branch -r --merged | grep -e 'feature\\|component' | sed 's/origin\\///'" | |
# delete merged feature branches local and on origin | |
cleanup = "!git branch -r --merged | grep -e 'feature\\|component' | sed 's/origin\\///' | xargs -n 1 git push --delete origin" |
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 | |
type User = string | |
type Title = string | |
type BugState = | |
| New | |
| Assigned of User | |
| Deferred | |
| Closed | |
type Bug = | |
{ Id : Guid |
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 "nuget: System.Reactive" // workaround for System.IO.FileNotFoundException: Could not load file or assembly | |
#r "nuget: Fake.Core.Target" | |
open System | |
open Fake.Core | |
let setScriptContext isCached scriptFile = | |
System.Environment.GetCommandLineArgs() | |
|> Array.skip 2 // skip fsi.exe; *.fsx | |
|> Array.toList |
OlderNewer