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
| // | |
| // Tests if regular expression matches all valid ES6 import syntaxes. | |
| // | |
| // ES6 Language Specification Reference: | |
| // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-imports | |
| // | |
| const ES6_IMPORT_REGEX = /\bimport\s+(?:.+\s+from\s+)?[\'"]([^"\']+)["\']/g; | |
| const VALID_ES6_IMPORT_SYNTAXES = [ |
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
| package main | |
| import ( | |
| "fmt" | |
| "log" | |
| "net/http" | |
| "os" | |
| ) | |
| func main() { |
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
| module DapperFSharp = | |
| open System.Data.SqlClient | |
| open System.Dynamic | |
| open System.Collections.Generic | |
| open Dapper | |
| let dapperQuery<'Result> (query:string) (connection:SqlConnection) = | |
| connection.Query<'Result>(query) | |
| let dapperParametrizedQuery<'Result> (query:string) (param:obj) (connection:SqlConnection) : 'Result seq = |
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
| #!/bin/bash -e | |
| #### | |
| # based on http://www.clock.co.uk/blog/a-guide-on-how-to-cache-npm-install-with-docker | |
| # | |
| # Set's the last modified timestamp of a file to it's repositories commit timestamp. | |
| # | |
| # Particularly useful with docker when building after a new git checkout has been made, | |
| # can improve docker build times for composer, bower, npm, etc | |
| # | |
| # @see https://github.com/docker/docker/issues/3556 |
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
| #!/usr/bin/env python | |
| """ | |
| A python implementation of the USA Today Diversity Index, first developed by | |
| Phil Meyer and Shawn McIntosh of USA Today in 1990; updated in 2000 by Meyer | |
| and Paul Overberg. | |
| Source and explanation: http://ire.org/resource-center/tipsheets/3473/ | |
| """ | |
| def simple(*categories): |
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 toMap dictionary = | |
| (dictionary :> seq<_>) | |
| |> Seq.map (|KeyValue|) | |
| |> Map.ofSeq |
NewerOlder