This file contains hidden or 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
| //// SINGLE RECORD //// | |
| var mainTableName = ''; | |
| var mainLookupFieldName = ''; | |
| var mainUpdateFieldName = ''; | |
| var linkTableName = ''; | |
| var linkLookupFieldName = ''; | |
| let mainTable = base.getTable(mainTableName); | |
| let mainLookupField = mainTable.getField(mainLookupFieldName); | |
| let mainUpdateField = mainTable.getField(mainUpdateFieldName); |
This file contains hidden or 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
| var tableName = ''; | |
| var groupFieldName = ''; | |
| var keepRecordsMin = 2; | |
| var keepRecordsMax = 6; | |
| var bulkDelete = true; | |
| ///////////////////// | |
| //// DO NOT EDIT //// | |
| ///////////////////// |
This file contains hidden or 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
| var tableName = ''; | |
| var columnName = ''; | |
| var incrementValue = 1 | |
| /////////////////// | |
| /// DO NOT EDIT /// | |
| /////////////////// | |
| let table = base.getTable(tableName); | |
| let record = await input.recordAsync("Choose a record", table); |
This file contains hidden or 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
| # /etc/apache2/extra/httpd-vhosts.conf | |
| <VirtualHost *:80> | |
| ServerAdmin webmaster@dummy-host.example.com | |
| DocumentRoot "/usr/docs/dummy-host.example.com" | |
| ServerName dummy-host.example.com | |
| ServerAlias www.dummy-host.example.com | |
| ErrorLog "/private/var/log/apache2/dummy-host.example.com-error_log" | |
| CustomLog "/private/var/log/apache2/dummy-host.example.com-access_log" common | |
| WSGIPassAuthorization On |
This file contains hidden or 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
| # LINUX | |
| brew install openssl | |
| echo 'export PATH="/usr/local/opt/openssl/bin:$PATH"' >> ~/.bash_profile | |
| export LDFLAGS="-L/usr/local/opt/openssl/lib" | |
| export LDFLAGS="-L/home/linuxbrew/.linuxbrew/opt/isl@0.18/lib" | |
| export CPPFLAGS="-I/home/linuxbrew/.linuxbrew/opt/isl@0.18/include" | |
| export PKG_CONFIG_PATH="/home/linuxbrew/.linuxbrew/opt/isl@0.18/lib/pkgconfig" | |
| pip install --install-option="--with-openssl" --install-option="--openssl-dir=//home/linuxbrew/.linuxbrew/opt/isl@0.18" pycurl | |
| # Mac |
This file contains hidden or 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
| curl -u <username>:<password> -i -H "Content-Type: application/json" -X POST -d '<body_dict>' <url> |
This file contains hidden or 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
| celery -A app.celery worker -l warning -f logs.log ## --concurrency=1 | |
| celery -A app.celery beat -l info ## -s /home/celery/var/run/celerybeat-schedule |
This file contains hidden or 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
| class ProxyUserQuerySetAndManagerTestCase(TestCase): | |
| email_data = { | |
| 'valid': 'xxx.xxx+test@icloud.com', // | |
| 'blank': '', | |
| 'mock': 'xxx+test@icloud.com', // | |
| 'mismatched': 'agh' | |
| } | |
| month_range_start = AccessTier.DONOR_ACCESS_DATA['MONTH']['date_min'] | |
| year_range_start = AccessTier.DONOR_ACCESS_DATA['YEAR']['date_min'] |
This file contains hidden or 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 get_fieldsets(self, request, obj=None): | |
| if request.user.is_superuser: | |
| fieldsets = copy.deepcopy(super().get_fieldsets(request, obj)) | |
| fieldsets[3][1]['fields'] = fieldsets[3][1]['fields'] + ( | |
| 'stripe_customer', | |
| 'stripe_token' | |
| ) | |
| return fieldsets | |
| else: | |
| return super().get_fieldsets(request, obj) |
This file contains hidden or 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 logging | |
| import stripe | |
| from django.conf import settings | |
| from account.models import Profile | |
| logger = logging.getLogger(__name__) | |
| del logging |