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
| Scenarios: | |
| Git: | |
| Conjure: | |
| 1. To query, use: Order.objects._collection.find() | |
| 2. Finding if an array field contains an element: | |
| Ex: Order.objects._collection.find({'array_thing.0': {'$exists': True}) | |
| 3. Finding values greater than or less than a certain range (This will also avoid pre-commmit hooks from trigger duplicate key use) | |
| Ex: '$and': [{'field_i_want': {'$gt': min_val}}, {'field_i_want': {'$lt': max_val}}]}, projection) | |
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
| https://zanon.io/posts/nosql-injection-in-mongodb | |
| https://blog.websecurify.com/2014/08/hacking-nodejs-and-mongodb.html |
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
| // Do this when running into issues such as duplicate form data | |
| $('#modalID').on('hidden.bs.modal', function () { | |
| $(this).data('bs.modal', null).remove(); | |
| }); |
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
| If you manually edit the repository and use credentials different from the one in the deployment services directory, | |
| it might blow away the credentials that jenkins uses to build on the repository. | |
| Also, using sudo or root will change permissions on the directory so permissions must be restored to the proper account. | |
| If so follow one of these steps: | |
| 1.Readd the credentials to the repository or jenkins build scripts | |
| 2. (Bad because it shows password): | |
| git config remote.origin.url "https://{username}:{password}@github.com/{username}/project.git" |
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
| #excell formats: | |
| default_format = easyxf() | |
| float_format = easyxf(num_format_str='#,##0.00') | |
| int_format = easyxf(num_format_str='#,##0') |
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
| // Requires jquery | |
| /* | |
| * Price Input Validator binds to classes price_validator | |
| * It changes the input based on the oninput event. | |
| * Usage: Bind to parent that will contain the dynamically generated | |
| * price_validator classes. Works for input fields. Possibly text fields and | |
| * text areas as well. Will work with copy and pasted inputs. | |
| */ | |
| $(function() { |
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
| // ES6 syntax is used. | |
| /* Key: Python format | |
| * Value: Javascript format | |
| */ | |
| const pyToJSDateFormats = Object.freeze({ | |
| '%A': 'dddd', //Weekday as locale’s full name: (In English: Sunday, .., Saturday)(Auf Deutsch: Sonntag, .., Samstag) | |
| '%a': 'ddd', //Weekday abbreivated: (In English: Sun, .., Sat)(Auf Deutsch: So, .., Sa) | |
| '%B': 'MMMM', //Month name: (In English: January, .., December)(Auf Deutsch: Januar, .., Dezember) | |
| '%b': 'MMM', //Month name abbreviated: (In English: Jan, .., Dec)(Auf Deutsch: Jan, .., Dez) |
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
| ===PCM DTC P0306:00-28=== | |
| Code: P0306 - cylinder 6 misfire detected | |
| Status: | |
| - Previously Set DTC - Not Present at Time of Request | |
| - Malfunction Indicator Lamp is Off for this DTC | |
| Module: Powertrain Control Module | |
| ===END PCM DTC P0306:00-28=== |
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 FulfillmentInstructions(Service): | |
| name = 'gg.order.svc.fulfillment_instructions' | |
| class SimpleIO: | |
| input_required = (AsIs('order_id'), ) | |
| input_optional = (AsIs('fulfillment_id'), ) | |
| def handle_POST(self): | |
| self.logger.info("POST") |
NewerOlder