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/cupertino.dart'; | |
import 'package:flutter/material.dart'; | |
class LoadingOverlay { | |
BuildContext _context; | |
void hide() { | |
Navigator.of(_context).pop(); | |
} |
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
''' Utility class Table for parsing an html table with Scrapy | |
''' | |
class InvalidSelector(Exception): | |
''' Exception raised when the table selector is invalid | |
''' | |
def validate_selector(selector): | |
''' Validates if a selector has a match and can be used | |
''' |
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 scrapy.shell import inspect_response | |
class GreycastleSpider(scrapy.Spider): | |
name = "greycastle" | |
start_urls = [ | |
'https://greycastle.se' |
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 = [ |
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 '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
# 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
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
stages: | |
- lint | |
- test | |
- coverage | |
default: | |
image: greycastle/jreader:2.3.0 | |
cache: | |
paths: |