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
function createDispatchAdvice(options) { | |
if (options.quantity) { | |
logger(`Setting quantity to ${options.quantity}`); | |
await DispatchAdviceEnvelope.addDispatchQuantity(options.quantity); | |
} | |
// blah blah | |
} |
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
package spock | |
import org.openqa.selenium.remote.RemoteWebDriver | |
@Singleton | |
class BrowserInstance { | |
def RemoteWebDriver driver | |
} |
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
<Authority auths={['foo', 'bar']}> | |
<Button>Click</Button> | |
</Authority> |
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
### Keybase proof | |
I hereby claim: | |
* I am pulse00 on github. | |
* I am pulse00 (https://keybase.io/pulse00) on keybase. | |
* I have a public key ASDGEzgLn0m5jyZvWKqK4n6Usu_J2WJuK256bCfqG7unkgo | |
To claim this, I am signing this object: |
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
// drop spring-data-rest and spring-rest-hateoas into your pom.xml | |
public interface BookRepository extends MongoRepository<Book, String> { | |
@Query(" {'name' : { $regex : '.*?0.*', $options: 'i' }} ") | |
Page<Book> filterBooksByName(@Param("term") String term, Pageable pageable); | |
} | |
// curl http://127.0.0.1:8080/book/search/filterBooksByName?term=Potter |
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
// java < 8 | |
if (document != null && document.getOrder() != null && document.getOrder().getAddress() != null && document.getOrder().getAddress().getStreet() != null) { | |
// boom | |
) | |
// java >= 8 | |
Optional<Street> street = resolve(() -> document.getOrder().getAddress().getStreet()); | |
if (street.isPresent() { |
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/python | |
import json | |
import sys | |
# take json from stdin, from source such as https://ip-ranges.amazonaws.com/ip-ranges.json | |
# and turn it into an AWS security group using Ansible | |
region = 'eu-west-1' | |
header_str = """--- | |
- hosts: 127.0.0.1 |
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
/* | |
* Licensed to the University Corporation for Advanced Internet Development, | |
* Inc. (UCAID) under one or more contributor license agreements. See the | |
* NOTICE file distributed with this work for additional information regarding | |
* copyright ownership. The UCAID licenses this file to You under the Apache | |
* License, Version 2.0 (the "License"); you may not use this file except in | |
* compliance with the License. You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* |
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
- name: Set image_id status | |
set_fact: | |
image_id: "{{region}}.{{os}}" |
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
{ "rds_facts": { | |
"attempts": 0, | |
"changed": false, | |
"instance": { | |
"endpoint": null | |
} | |
} |
NewerOlder