- https://github.com/rendrjs/rendr/blob/master/server/server.js
- https://github.com/Strider-CD/strider/blob/master/dist-lib/app.js
- https://github.com/majodev/google-webfonts-helper/blob/master/server/config/express.js
- https://github.com/blockstack/stacks-blockchain-sidecar/blob/b413143b60af1603dc0d1d80f3029fcaa17bec42/src/api/routes/tx.ts
- https://github.com/blockstack/stacks-blockchain-sidecar/blob/b816732f27043282c978d2e24837e257b2f13582/src/api/init.ts
- https://github.com/blockstack/stacks-blockchain-sidecar/blob/27463b4a2934f71a92fec5a6af7124041935cfea/src/api/routes/debug.ts
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
// Paste into your DevTools Console. | |
list = $$('input[name*="301_redirects[request]"]').map(src => src.value ? `${src.value} ${src.closest('div').querySelector('input[name*="301_redirects[destination]"]').value}` | |
: '').filter(Boolean).sort().join('\n'); | |
copy(list); |
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
// Adapted from source: https://stackoverflow.com/a/19204980 | |
const flatten = (function(isArray, wrapped) { | |
return function(table) { | |
return reduce('', {}, table); | |
}; | |
function reduce(path, accumulator, table) { | |
if (isArray(table)) { | |
const length = table.length; |
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
describe('test', () => { | |
const mockFetchPromise = () => | |
Promise.resolve({ | |
ok: true, | |
json: () => Promise.resolve({}), | |
status: 200, | |
statusText: 'OK' | |
}); | |
beforeEach(() => { |
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
@supports (padding-top: constant(safe-area-inset-top)) { | |
body { | |
padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); | |
} | |
} | |
@media (display-mode: fullscreen) { | |
body { | |
padding: 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
/** | |
* Hijacks `window.onerror` for debugging Chrome for iOS (WebView) via `chrome://inspect`. | |
* | |
* @returns {string|undefined} | |
*/ | |
window.onerror = function(message, url, lineNumber, columnNumber, error) { | |
console.error( | |
[ | |
['Error message:', message].join(' '), | |
['URL:', url].join(' '), |
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
const isProd = process.env.NODE_ENV === 'production'; | |
const options = { | |
purgecss: { | |
// Docs for PurgeCSS: | |
// - https://purgecss.com/configuration.html#options | |
// Consider: | |
// - https://github.com/americanexpress/purgecss-loader | |
// - https://frontstuff.io/how-i-dropped-250-kb-of-dead-css-weight-with-purgecss | |
// - https://gorails.com/episodes/purgecss |
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
rules_version = '2'; | |
service cloud.firestore { | |
match /databases/{database}/documents { | |
match /{document=**} { | |
allow read, write: if false; | |
} | |
} | |
} |
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
root = true | |
[*] | |
indent_style = space | |
indent_size = 2 | |
end_of_line = lf | |
charset = utf-8 | |
trim_trailing_whitespace = true | |
insert_final_newline = true |