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
#!/bin/sh | |
# Check for unstaged changes | |
[ `git status --porcelain=1 | wc -l` -ne 0 ] && echo "unstaged changes found" && exit 1 | |
exit 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
#!/bin/bash | |
# Step 1: Store the modified output in a variable | |
todos=$(git grep -l TODO ./src | grep -v 'graphqlTypes' | xargs -n1 git blame -f -w | grep TODO | sed 's/\([0-9]\{2,\}\)) */\1) /') | |
# Step 2: Count the number of lines in the modified output | |
todo_count=$(echo "$todos" | grep -v '^$' | wc -l | sed 's/^[[:space:]]*//') # Remove leading spaces | |
# Step 3: Print the count in yellow text | |
if [ "$todo_count" -gt 0 ]; then |
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
def test_patch_one_to_many(mutation, fruit, color): | |
result = mutation( | |
'{ fruit: updateFruits(data: { id: "1", color: { set: 1 } }) { color { name } } }', | |
) | |
> assert not result.errors | |
E assert not [GraphQLError("Expected Iterable, but did not find one for field 'GeoMutation.updateFruits'.", locations=[SourceLocation(line=1, column=12)], path=['fruit'])] | |
E + where [GraphQLError("Expected Iterable, but did not find one for field 'GeoMutation.updateFruits'.", locations=[SourceLocation(line=1, column=12)], path=['fruit'])] = ExecutionResult(data=None, errors=[GraphQLError("Expected Iterable, but did not find one for field 'GeoMutation.updateFruits'.", locations=[SourceLocation(line=1, column=12)], path=['fruit'])], extensions={}).errors |
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
-- Based on the word done by elrobis | |
-- http://cartometric.com/blog/2014/01/27/postgresql-postgis-implementation-of-google-encoded-polyline-algorithm | |
CREATE OR REPLACE FUNCTION pim.encode_polyline( | |
in_wkt character varying | |
) | |
RETURNS character varying[] AS $$ | |
DECLARE | |
g GEOMETRY; | |
BEGIN |
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
{% extends "admin/base.html" %} | |
{% block extrahead %} | |
{{block.super}} | |
<script> | |
$(function () { | |
$('.datetime').append( | |
'<br>Times are shown in Pacific Standard Time' + | |
'<br>Be aware if you are editing information in another timezone' | |
); | |
}); |