Skip to content

Instantly share code, notes, and snippets.

View cosmith's full-sized avatar
🚚

Corentin Smith cosmith

🚚
View GitHub Profile
@yagudaev
yagudaev / cypress_support_hooks.js
Last active September 16, 2021 08:46
Cypress Fetch Support Workaround - replaces fetch request with traditional XHR so cypress can track them
// cypress/support/hooks.js
// Cypress does not support listening to the fetch method
// Therefore, as a workaround we polyfill `fetch` with traditional XHR which
// are supported. See: https://github.com/cypress-io/cypress/issues/687
enableFetchWorkaround()
// private helpers
function enableFetchWorkaround() {
let polyfill
@jdunck
jdunck / force_html_middleware.py
Last active August 29, 2015 14:02 — forked from leetrout/force_html_middleware.py
A hack to wrap API responses in HTML so that django debug toolbar can be used on API requests.
def uncompress_string(c):
from io import BytesIO
from gzip import GzipFile
zbuf = BytesIO(c)
with GzipFile(mode='rb', compresslevel=6, fileobj=zbuf) as zfile:
return zfile.read()
class ForceDebugJSONMiddleware(object):
def process_response(self, request, response):
"""Add html, head, and body tags so debug toolbar will activate."""
@bitemyapp
bitemyapp / gist:8739525
Last active May 7, 2021 23:22
Learning Haskell
@endolith
endolith / Has weird right-to-left characters.txt
Last active October 26, 2024 13:55
Unicode kaomoji smileys emoticons emoji
ּ_בּ
בּ_בּ
טּ_טּ
כּ‗כּ
לּ_לּ
מּ_מּ
סּ_סּ
תּ_תּ
٩(×̯×)۶
٩(̾●̮̮̃̾•̃̾)۶