Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deploy cmccandless/tools to github.com/cmccandless/tools.git:gh-pages
- Loading branch information
0 parents
commit 60d706b
Showing
13 changed files
with
387 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[flake8] | ||
exclude = __init__.py, docs/, build/, setup.py, *.egg-info, venv*/ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
|
||
# Created by https://www.gitignore.io/api/python | ||
|
||
### Python ### | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
wheels/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
MANIFEST | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*.cover | ||
.hypothesis/ | ||
.pytest_cache/ | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
local_settings.py | ||
db.sqlite3 | ||
|
||
# Flask stuff: | ||
instance/ | ||
.webassets-cache | ||
|
||
# Scrapy stuff: | ||
.scrapy | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# PyBuilder | ||
target/ | ||
|
||
# Jupyter Notebook | ||
.ipynb_checkpoints | ||
|
||
# pyenv | ||
.python-version | ||
|
||
# celery beat schedule file | ||
celerybeat-schedule | ||
|
||
# SageMath parsed files | ||
*.sage.py | ||
|
||
# Environments | ||
.env | ||
.venv | ||
env/ | ||
venv/ | ||
ENV/ | ||
env.bak/ | ||
venv.bak/ | ||
|
||
# Spyder project settings | ||
.spyderproject | ||
.spyproject | ||
|
||
# Rope project settings | ||
.ropeproject | ||
|
||
# mkdocs documentation | ||
/site | ||
|
||
# mypy | ||
.mypy_cache/ | ||
|
||
### Python Patch ### | ||
.venv/ | ||
|
||
|
||
# End of https://www.gitignore.io/api/python |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
sudo: false | ||
language: python | ||
python: | ||
- "3.6" | ||
|
||
install: | ||
- make init | ||
|
||
before_script: | ||
- make lint | ||
- make test | ||
|
||
script: | ||
- make generate | ||
|
||
deploy: | ||
provider: pages | ||
skip-cleanup: true | ||
github-token: $GITHUB_TOKEN | ||
on: | ||
branch: master |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Contributing Guide | ||
1. Add your tool to `tools.yml`, including the following fields (if the appropriate category does not exist, add it): | ||
|
||
|
||
```yml | ||
Category: | ||
Tool name: | ||
Description: Short description of the tool | ||
/* Is there is a permanent, free version available? */ | ||
Free: yes | ||
/* Tool website URL */ | ||
Link: https://example.com | ||
``` | ||
|
||
2. Create a Pull Request for your changes. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
all: init lint test generate | ||
|
||
init: | ||
python -m pip install -r requirements.txt | ||
|
||
lint: | ||
python -m pip check | ||
python -m flake8 *.py | ||
|
||
test: | ||
python -m pytest -v | ||
|
||
generate: | ||
python generate.py |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[![Build Status](https://travis-ci.com/cmccandless/tools.svg?branch=master)](https://travis-ci.com/cmccandless/tools) | ||
|
||
# Tools | ||
|
||
A collection of useful development tools |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
theme: jekyll-theme-slate |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#!/usr/bin/env python | ||
from jinja2 import Environment, PackageLoader, select_autoescape | ||
import strictyaml | ||
from strictyaml import Map, MapPattern, Url, Bool, Regex | ||
from datetime import datetime | ||
|
||
|
||
def load_data(filename): | ||
schema = MapPattern( | ||
Regex(u'[A-Za-z. ]+'), | ||
MapPattern( | ||
Regex(u'[A-Za-z\\-. ]+'), | ||
Map( | ||
{ | ||
'Description': Regex('.+'), | ||
'Free': Bool(), | ||
'Link': Url(), | ||
}, | ||
Regex(u'.+') | ||
) | ||
) | ||
) | ||
with open(filename) as f: | ||
return strictyaml.load(f.read(), schema).data | ||
|
||
|
||
def linkify(text): | ||
return text.lower().replace(' ', '-').replace('.', '') | ||
|
||
|
||
def render_j2(data, output_file='index.md'): | ||
env = Environment( | ||
loader=PackageLoader(__name__, '.'), | ||
autoescape=select_autoescape([]) | ||
) | ||
env.filters['linkify'] = linkify | ||
templ = env.select_template(['index.j2']) | ||
return templ.render( | ||
data=data.items(), | ||
timestamp=datetime.now().strftime("%Y-%m-%d %H:%M:%S") | ||
) | ||
|
||
|
||
if __name__ == '__main__': | ||
data = load_data('tools.yml') | ||
with open('index.md', 'w') as f: | ||
f.write(render_j2(data)) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Tools | ||
|
||
## Table of Contents | ||
{% for category, tools in data | sort -%} | ||
- [{{ category }}](#{{ category | linkify }}) | ||
{% endfor %} | ||
{%- for category, tools in data | sort %} | ||
## {{ category }} | ||
|
||
| Title | Description | Free | Link | | ||
|:--- |:--- |:---:|:--- | | ||
{% for title, tool in tools.items() | sort -%} | ||
| {{ title }} | {{ tool['Description'] }} | {{ ':heavy_check_mark:' if tool['Free'] else ':x:' }} | [Go]({{ tool['Link'] }}) | | ||
{% endfor %} | ||
{% endfor %} | ||
|
||
*Generated at {{ timestamp }} UTC* |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
# Tools | ||
|
||
## Table of Contents | ||
- [.NET](#net) | ||
- [Cloud Hosting](#cloud-hosting) | ||
- [Code Review](#code-review) | ||
- [Continuous Integration](#continuous-integration) | ||
- [IDE](#ide) | ||
- [Monitoring](#monitoring) | ||
- [Network Analysis](#network-analysis) | ||
- [Web Development](#web-development) | ||
|
||
## .NET | ||
|
||
| Title | Description | Free | Link | | ||
|:--- |:--- |:---:|:--- | | ||
| LINQPad | The Ultimate Scratchpad for C#, F# and VB | :heavy_check_mark: | [Go](https://www.linqpad.net/) | | ||
|
||
|
||
## Cloud Hosting | ||
|
||
| Title | Description | Free | Link | | ||
|:--- |:--- |:---:|:--- | | ||
| Heroku | Cloud hosting with simple GitHub integration | :heavy_check_mark: | [Go](https://www.heroku.com/home) | | ||
|
||
|
||
## Code Review | ||
|
||
| Title | Description | Free | Link | | ||
|:--- |:--- |:---:|:--- | | ||
| Gerrit | Web based code review and repository management for Git | :heavy_check_mark: | [Go](https://www.gerritcodereview.com/) | | ||
|
||
|
||
## Continuous Integration | ||
|
||
| Title | Description | Free | Link | | ||
|:--- |:--- |:---:|:--- | | ||
| AppVeyor | Cloud-hosted continuous integration service for Windows and Linux | :heavy_check_mark: | [Go](https://www.appveyor.com/) | | ||
| Travis-CI | Cloud-hosted continuous integration service for Linux and OSX (Windows support under development) | :heavy_check_mark: | [Go](https://travis-ci.com/) | | ||
|
||
|
||
## IDE | ||
|
||
| Title | Description | Free | Link | | ||
|:--- |:--- |:---:|:--- | | ||
| Visual Studio Code | Free. Open source. Runs everywhere. | :heavy_check_mark: | [Go](https://code.visualstudio.com/) | | ||
|
||
|
||
## Monitoring | ||
|
||
| Title | Description | Free | Link | | ||
|:--- |:--- |:---:|:--- | | ||
| Visual Ping | Sends notifications when a web page has changed | :heavy_check_mark: | [Go](https://visualping.io/) | | ||
|
||
|
||
## Network Analysis | ||
|
||
| Title | Description | Free | Link | | ||
|:--- |:--- |:---:|:--- | | ||
| Nmap | Free and open source utility for network discovery and security auditing. | :heavy_check_mark: | [Go](https://nmap.org/) | | ||
| Wireshark | Packet capture and protocol analysis | :heavy_check_mark: | [Go](https://www.wireshark.org/) | | ||
|
||
|
||
## Web Development | ||
|
||
| Title | Description | Free | Link | | ||
|:--- |:--- |:---:|:--- | | ||
| ngrok | One command for an instant, secure URL to your localhost server through any NAT or firewall. | :heavy_check_mark: | [Go](https://ngrok.com/) | | ||
|
||
|
||
|
||
*Generated at 2018-10-28 18:57:07 UTC* |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
flake8==3.5.0 | ||
httplib2==0.11.3 | ||
jinja2==2.10 | ||
pytest==3.9.2 | ||
strictyaml==0.14.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import unittest | ||
import httplib2 | ||
from http import HTTPStatus | ||
|
||
|
||
from generate import load_data | ||
|
||
|
||
class ToolsTest(unittest.TestCase): | ||
def setUp(self): | ||
self.data = load_data('tools.yml') | ||
|
||
def test_validate_links(self): | ||
h = httplib2.Http() | ||
for tool in (t for cts in self.data.values() for t in cts.values()): | ||
url = tool['Link'] | ||
resp = h.request(url, 'HEAD') | ||
status = HTTPStatus(int(resp[0]['status'])) | ||
status_msg = f'{status} {status.name}: {url}' | ||
self.assertLess( | ||
status, | ||
300, | ||
status_msg | ||
) |
Oops, something went wrong.