Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View niespodd's full-sized avatar
🧩
Focusing

Dariusz Niespodziany niespodd

🧩
Focusing
View GitHub Profile
@niespodd
niespodd / limit_chromium_fps.patch
Last active August 29, 2023 15:28
Chromium patch to reduce CPU load on Swiftshader no-headless
/**
ref: https://cs.chromium.org/chromium/src/components/viz/common/frame_sinks/begin_frame_args.h?q=60hz&dr=C&l=11
The original 16666 corresponds to 60 Hz/FPS: (1 / 60) * 10^6 = 16666μs
**/
diff --git a/components/viz/common/frame_sinks/begin_frame_args.h b/components/viz/common/frame_sinks/begin_frame_args.h
index c4d0e29c7d65..a39ede9849c6 100644
--- a/components/viz/common/frame_sinks/begin_frame_args.h
+++ b/components/viz/common/frame_sinks/begin_frame_args.h
@@ -91,7 +91,8 @@ struct VIZ_COMMON_EXPORT BeginFrameArgs {
@niespodd
niespodd / package.json
Last active May 8, 2023 09:07
Making web3/bitcore-lib work with Angular 6-11 and >=11
{...
"scripts": {
"postinstall": "node patch.js",
...
}
}
@niespodd
niespodd / lang_switcher.py
Created February 10, 2019 18:46
dj i18n lang switcher template tag
register = Library()
@register.simple_tag(takes_context=True)
def change_lang(context, lang=None, *args, **kwargs):
try:
request = context.get('request')
path = request.path
url_parts = resolve(path)
@niespodd
niespodd / onclick.js for end screen
Created October 28, 2017 18:12
Escape TypeForm with form_id without premium, enjoy.
javascript:(function(){top.window.location='http://foo.bar/co?tf_id='+typeform.submissionRepository.token.split("$")[0];})();