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 | |
script=`basename "$0"` | |
if [ $# -gt 0 ] && [ "$1" = "-e" ]; then | |
e="-e" | |
fi | |
echo "Removing old Postman tarballs" | |
rm -f $(ls Postman*.tar.gz) |
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
# .../site-packages/graphene_django/types.py | |
#...... | |
class DjangoObjectType(ObjectType): | |
@classmethod | |
def __init_subclass_with_meta__(cls, model=None, registry=None, skip_registry=False, | |
only_fields=(), exclude_fields=(), filter_fields=None, connection=None, | |
## use_connection=None, interfaces=(), **options): | |
connection_class=None, use_connection=None, interfaces=(), **options): | |
assert is_valid_django_model(model), ( |
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
pragma solidity ^0.4.24; | |
import "./IERC20.sol"; | |
import "./SafeMath.sol"; | |
/** | |
* @title Standard ERC20 token | |
* | |
* @dev Implementation of the basic standard token. | |
* https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md |
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
- create a .py file with 2 classes (OAuth2ProtectedResourceMixin and OAuth2ProtectedGraph). see 'utils.py' file | |
- then in your Django's 'urls.py', wrap the graphql endpoint. see 'urls.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
#!/bin/bash | |
DB=[YOUR_DB_NAME] | |
OWNER=[NEW_OWNER] | |
# alter tables owner | |
for tbl in `psql -qAt -c "select tablename from pg_tables where schemaname = 'public';" $DB` ; do psql -c "alter table \"$tbl\" owner to $OWNER" $DB ; done | |
# alter sequences owner | |
for tbl in `psql -qAt -c "select sequence_name from information_schema.sequences where sequence_schema = 'public';" $DB` ; do psql -c "alter table \"$tbl\" owner to $OWNER" $DB ; done |