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
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin | |
<?xml version="1.0" encoding="utf-8"?> | |
<packages> | |
<package id="googlechrome " /> | |
<package id="notepadplusplus.install"/> | |
<package id="githubforwindows"/> | |
<package id="javaruntime"/> | |
<package id="7zip.install"/> | |
<package id="adobereader"/> |
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
public ReactiveCommand<$type$> $name$ { get; private set; } |
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
echo ------------------------------------------------------------ | |
echo --- installing curl | |
echo ------------------------------------------------------------ | |
sudo apt-get install -y curl | |
curl -sL https://deb.nodesource.com/setup | sudo bash - | |
echo ------------------------------------------------------------ | |
echo --- installing git | |
echo ------------------------------------------------------------ | |
sudo apt-get install -y git |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Index</title> | |
</head> | |
<body> | |
Index page. | |
<!-- This image always fails to load when served from go, but is fine if I just double click the html file --> |
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
r := mux.NewRouter() | |
r.StrictSlash(true) | |
apiV1 := r.PathPrefix("/api/v1").Subrouter() | |
//recipes | |
apiV1.HandleFunc("/{userID}/recipes/", ws.GetAllRecipes).Methods("GET") | |
apiV1.HandleFunc("/{userID}/recipes/{recipeID}", ws.GetRecipeByID).Methods("GET") | |
apiV1.HandleFunc("/{userID}/recipes/", ws.CreateRecipe).Methods("POST") | |
apiV1.HandleFunc("/{userID}/recipes/{recipeID}", ws.EditRecipe).Methods("PUT") | |
apiV1.HandleFunc("/{userID}/recipes/{recipeID}", ws.DeleteRecipe).Methods("DELETE") |
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
echo Go check out angular.io for a really good tutorial! | |
mkdir src | |
cd src | |
#create base the index.html | |
awk 'BEGIN { print "<html>" | |
print "<head>" | |
print " <title>TitleHere</title>" | |
print " <script src=\"../node_modules/systemjs/dist/system.src.js\"></script>" | |
print " <script src=\"../node_modules/angular2/bundles/angular2.dev.js\"></script>" | |
print " <script>" |
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
// Learn more about F# at http://fsharp.org | |
// See the 'F# Tutorial' project for more help. | |
open System | |
open System.IO | |
open Akka.FSharp | |
type ProducerCommand = | |
| Start | |
| Stop |
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
let parseState value = | |
match value with | |
| 0us -> | |
printfn "state 0" | |
| value when value &&& 16us <> 16us -> | |
printfn "state 1" | |
| value when value &&& 32us <> 32us -> | |
printfn "state 2" | |
| value when value &&& 64us <> 64us -> | |
printfn "state 3" |
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
type Quaternion = | |
{ | |
w:float | |
x:float | |
y:float | |
z:float | |
} with | |
static member (+) (r: Quaternion, q: Quaternion) = | |
{w=r.w+q.w;x=r.x+q.x;y=r.y+q.y;z=r.z+q.z} | |
static member (-) (r: Quaternion, q: Quaternion) = |
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
public Task<List<Tag>> SearchTags(params string[] searchTerms) | |
{ | |
var sql = @"SELECT * FROM Tags WHERE "; | |
var term = "value LIKE %@t{0}%"; | |
var sb = new StringBuilder(sql); | |
for (int i = 0; i < searchTerms.Length; i++) | |
{ | |
sb.Append(string.Format(term, i + 1)); | |
if(i != searchTerms.Length - 1)//islastterm |