Skip to content

Instantly share code, notes, and snippets.

guybowden

Block or report user

Report or block guybowden

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@guybowden
guybowden / readme.md
Created Apr 29, 2019
simple simple notification service / simple queue service demo
View readme.md

Simple demo of pub and sub to the AWS notification and queue services:

Note: for some reason the queue is not being subscribed to the notification (have to go in and do it in the console).

Just run the two files in two terminals and watch as one program publishes events, whilst another one consumnes them.

Publish events:

$ python sns-pub.py
View Route.gpx
<?xml version="1.0" encoding="utf-8"?>
<gpx version="1.1" creator="Movescount - http://www.movescount.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd http://www.cluetrust.com/XML/GPXDATA/1/0 http://www.cluetrust.com/Schemas/gpxdata10.xsd http://www.garmin.com/xmlschemas/TrackPointExtension/v1 http://www.garmin.com/xmlschemas/TrackPointExtensionv1.xsd" xmlns:gpxdata="http://www.cluetrust.com/XML/GPXDATA/1/0" xmlns:gpxtpx="http://www.garmin.com/xmlschemas/TrackPointExtension/v1" xmlns="http://www.topografix.com/GPX/1/1">
<rte>
<name>Untitled route</name>
<rtept lat="45.791789" lon="6.735023">
<ele>1960</ele>
</rtept>
<rtept lat="45.791755" lon="6.735064">
<ele>1960</ele>
@guybowden
guybowden / post-commit
Created Aug 29, 2017
Post commit hook to copy procfile if migrations are detected
View post-commit
#!/bin/sh
SRC_PATTERN="migrations/"
git show --name-only | if grep --quiet "$SRC_PATTERN"
then
cp Procfile_with_release Procfile
git commit . -m "Added release command since a migration file was modified or created."
fi
View test_settings.py
from base import *
SEARCH_INDEX = os.environ.get('SEARCH_INDEX', 'test_haystack')
HAYSTACK_CONNECTIONS = {
'default': {
'ENGINE': os.environ.get('HAYSTACK_ENGINE', 'haystack.backends.elasticsearch_backend.ElasticsearchSearchEngine'),
'URL': ELASTICSEARCH_URL,
'INDEX_NAME': SEARCH_INDEX,
'KWARGS': ELASTICSEARCH_KWARGS
},
View pytest.ini
[pytest]
python_paths=/app/seekr
DJANGO_SETTINGS_MODULE=seekr.settings.test_settings
norecursedirs=migrations node_modules bower_components src pages paypal dial lockdown threadedcomments
python_files=test_*.py tests.py
addopts = --reuse-db
[flake8]
exclude = migrations node_modules bower_components src pages paypal dial lockdown threadedcomments
View ion.rangeSlider.skinCSS3.css
.irs {
height: 40px;
margin:20px 0;
}
.irs-with-grid {
height: 60px;
}
.irs-line {
height: 10px; top: 33px;
You can’t perform that action at this time.