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
chooseHorse :: (RandomGen g) => g -> (Horse, g) | |
chooseHorse gen = | |
let | |
(rand, nextGen) = | |
random gen :: (Float, g) | |
-- Just choose any horse for the moment | |
horse = | |
horses !! 0 | |
in |
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
[11:11:05] ├── help | |
[11:11:05] ├─┬ default | |
[11:11:05] │ └── dev:online | |
[11:11:05] ├── make | |
[11:11:05] ├── make:prod | |
[11:11:05] ├─┬ make:watch | |
[11:11:05] │ └── make | |
[11:11:05] ├── server:start | |
[11:11:05] ├── server:restart | |
[11:11:05] ├─┬ server:watch |
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
#!groovy | |
node { | |
def nodeHome = tool name: 'NodeJS 6.9.5', type: 'nodejs' | |
def yarnHome = tool name: 'yarn', type: 'com.cloudbees.jenkins.plugins.customtools.CustomTool' | |
env.PATH = "${env.path}:${nodeHome}/bin:${yarnHome}" | |
stage('Checkout') { | |
checkout scm | |
} |
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
seleniumArgs = { | |
baseURL: 'https://selenium-release.storage.googleapis.com', | |
version: '2.48', | |
drivers: { | |
chrome: { | |
version: '2.25', | |
arch: process.arch, | |
baseURL: 'https://chromedriver.storage.googleapis.com' | |
}, | |
firefox: { |
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
``` | |
⇒An element could not be located on the page using the given search parameters. (WARNING: The server did not provide any stacktrace | |
information) Command duration or timeout: 11 milliseconds For documentation on this error, please visit: | |
http://seleniumhq.org/exceptions/no_such_element.html Build info: version: '3.0.1', revision: '1969d75', time: '2016-10-18 09:48:19 | |
-0700' System info: host: 'mac-185-44-130-125.browserstack.com', ip: '185.44.130.125', os.name: 'Mac OS X', os.arch: 'x86_64', | |
os.version: '10.12', java.version: '1.8.0_51' Driver info: org.openqa.selenium.safari.SafariDriver Capabilities [{applicationCacheEnabled=true, rotatable=false, databaseEnabled=true, handlesAlerts=true, version=12602.1.50, | |
cleanSession=true, platform=MAC, nativeEvents=true, locationContextEnabled=false, webStorageEnabled=true, browserName=safari, | |
javascriptEnabled=true, cssSelectorsEnabled=true}] Session ID: 61CDF156-2A55-4237-BFEB-8B8BCFE42A42 *** Element info: | |
{Using=css selector, value=body.loading} | |
``` |
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
// A very ugly PHP way of removing duplicates from an array with regard to strict equality | |
$users = (function(...$arrays) { | |
$uniqueElements = []; | |
foreach ($arrays as $array) { | |
foreach ($array as $element) { | |
$uniqueElements[spl_object_hash($element)] = $element; | |
} | |
} | |
return array_values($uniqueElements); | |
})($array1, $array2); |
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
root@ip-172-30-0-115:/etc/varnish# varnishlog -g request | |
* << Request >> 2 | |
- Begin req 1 rxreq | |
- Timestamp Start: 1481731967.821513 0.000000 0.000000 | |
- Timestamp Req: 1481731967.821513 0.000000 0.000000 | |
- ReqStart 127.0.0.1 40298 | |
- ReqMethod GET | |
- ReqURL /ppt/tests/a/a2-e4.html?contentRoot=content&id=20 | |
- ReqProtocol HTTP/1.1 | |
- ReqHeader accept-encoding: gzip,deflate |
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
vcl 4.0; | |
# Default backend definition. Set this to point to your content server. | |
backend default { | |
.host = "127.0.0.1"; | |
.port = "3001"; | |
} | |
sub vcl_backend_response { | |
if (beresp.http.Cache-Control == "no-cache") { |
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
{-| In your face, type system! This function allows some very un-Elmy run-type introspection on type parameters by hacking around | |
with toString, regular expressions and Json decoders. | |
For example, if you have a type: | |
type Literal | |
= MyDetails { age : Int, height : Int } | |
Then you could use this function to get the type parameter as a `Dict String Int` with: |
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 HttpReader exposing | |
( ResponseReader | |
, jsonReader | |
, get | |
, withZeroStatusAllowed | |
) | |
{-| | |
-} |