| API | Status Codes |
|---|---|
| [Twitter][tw] | 200, 304, 400, 401, 403, 404, 406, 410, 420, 422, 429, 500, 502, 503, 504 |
| [Stripe][stripe] | 200, 400, 401, 402, 404, 429, 500, 502, 503, 504 |
| [Github][gh] | 200, 400, 422, 301, 302, 304, 307, 401, 403 |
| [Pagerduty][pd] | 200, 201, 204, 400, 401, 403, 404, 408, 500 |
| [NewRelic Plugins][nr] | 200, 400, 403, 404, 405, 413, 500, 502, 503, 503 |
| [Etsy][etsy] | 200, 201, 400, 403, 404, 500, 503 |
| [Dropbox][db] | 200, 400, 401, 403, 404, 405, 429, 503, 507 |
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
| // Show rendered HTML | |
| const wrapper = shallow(<App />) | |
| console.log(wrapper.debug()) | |
| // Disable lifecycle methods of react within tests | |
| const wrapper = mount(<App />, { disableLifecycleMethods: true }) | |
| // Assert number of occurrences | |
| expect(wrapper.find('p').length).toBe(1) |
Just migrated it from Codepen.io to markdown. Credit goes to David Conner.
| Working with DOM | Working with JS | Working With Functions |
|---|---|---|
| Accessing Dom Elements | Add/Remove Array Item | Add Default Arguments to Function |
| Grab Children/Parent Node(s) | Add/Remove Object Properties | Throttle/Debounce Functions |
| Create DOM Elements | Conditionals |
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
| // time and time end | |
| console.time("This"); | |
| let total = 0; | |
| for (let j = 0; j < 10000; j++) { | |
| total += j | |
| } | |
| console.log("Result", total); | |
| console.timeEnd("This"); | |
| // Memory |
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
| /*------------------------------------------ | |
| Responsive Grid Media Queries - 1280, 1024, 768, 480 | |
| 1280-1024 - desktop (default grid) | |
| 1024-768 - tablet landscape | |
| 768-480 - tablet | |
| 480-less - phone landscape & smaller | |
| --------------------------------------------*/ | |
| @media all and (min-width: 1024px) and (max-width: 1280px) { } | |
| @media all and (min-width: 768px) and (max-width: 1024px) { } |
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
| Reference | |
| https://developer.android.com/jetpack/androidx/migrate | |
| android/build.gradle: | |
| ==================== | |
| buildscript { | |
| ext { | |
| googlePlayServicesVersion = "16.+" | |
| firebaseVersion = "17.3.4" |
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
| /* | |
| CTA Button - Blue | |
| ------------------------------------------------------------ */ | |
| a.cta-button-blue { | |
| background-color: #77c4d5; | |
| box-shadow: 0 4px 0 0 #66abbd; | |
| } | |
| a.cta-button-blue:hover { |
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
| """ | |
| Django ORM Optimization Tips | |
| Caveats: | |
| * Only use optimizations that obfuscate the code if you need to. | |
| * Not all of these tips are hard and fast rules. | |
| * Use your judgement to determine what improvements are appropriate for your code. | |
| """ | |
| # --------------------------------------------------------------------------- |
Steps to deploy a Node.js app to Digital Ocean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt
If you use the referal link below, you get $10 free (1 or 2 months) https://m.do.co/c/5424d440c63a
I will be using the root user, but would suggest creating a new user
NewerOlder