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
void registerRoutes() { | |
// ... | |
final useNewArticlePage = isDebugMode == true; | |
if (useNewArticlePage) { | |
routing.register(Routes.Article, (context, param) => FixedSizeArticlePage()); | |
} else { | |
routing.register(Routes.Article, (context, param) => ArticlePage()); | |
} | |
// .... | |
} |
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
Then("the first match is {string}") do |title| | |
expect(find(:css, '#search div h3', :match => :first).text).to eq(title) | |
end | |
When("tapping search") do | |
click_button('btnK') | |
end |
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
Feature: Google Search | |
Scenario: Searching a term will generate results | |
Given the user is on google top page | |
When searching for "greycastle ab software" | |
Then the first match is "Greycastle - Greycastle" | |
Scenario: The lucky feature will navigate straight to the first match | |
Given the user is on google top page | |
When entering "greycastle ab software" |
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
cache: | |
paths: | |
- /flutter/bin/cache/dart-sdk | |
build: | |
image: greycastle/jreader:2.3.0 | |
script: | |
- flutter analyze | |
- pub global activate junitreport | |
- export PATH="$PATH":"$HOME/.pub-cache/bin" |
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
stages: | |
- lint | |
- test | |
- coverage | |
default: | |
image: greycastle/jreader:2.3.0 | |
cache: | |
paths: |
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
stages: | |
- lint | |
- test | |
- coverage | |
default: | |
image: greycastle/flutter:2.2.0 | |
cache: | |
paths: |
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
# Add this pre-commit file to ./.git/hooks/pre-commit | |
#!/bin/sh | |
flutter analyze |
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 'package:flutter/widgets.dart'; | |
typedef ItemBuilder<T> = Widget Function(BuildContext context, T item); | |
class TitledListOfListBuilder<T> extends StatelessWidget { | |
final List<List<T>> lists; | |
final ItemBuilder<T> itemBuilder; | |
final IndexedWidgetBuilder titleBuilder; | |
TitledListOfListBuilder({@required this.lists, @required this.itemBuilder, @required this.titleBuilder}); |
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
<html> | |
<head> | |
<script type="text/javascript" src="https://code.jquery.com/jquery-3.6.0.min.js"></script> | |
<script type="text/javascript"> | |
function setOutput(html) { | |
$('#code-output').text(html) | |
$('#rendered-ouput').html(html) | |
} | |
function renderOutput(packageName, githubName) { |
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 scrapy | |
from table import Table | |
# requires https://gist.github.com/ddikman/7426cad6cba342b162162babc1a5d0a3 to be placed as tably.py in the same folder | |
class TableSpider(scrapy.Spider): | |
name = "table-scraper" | |
start_urls = [ |