Skip to content

Instantly share code, notes, and snippets.

View MadProbe's full-sized avatar
🌐
nicht tot

Evgeniy Istomin MadProbe

🌐
nicht tot
  • 127.0.0.1
View GitHub Profile
@Talv
Talv / NOTES.md
Last active April 1, 2024 09:30
StarCraft 2 Custom Games list freeze - technical explanation [2024/03]

UPDATE 29-03-2024: Bug described below was addressed in 5.0.13.92028 released on 26th March. However not long since this event, a new exploit is now being used in similar manner - publishing malformed map, then hosting such map publicly, will trigger a game client crash.

This new variant is harmless - cannot be exploited to distribute malware or anything of this sort. More info about it on the SC2 Forum.

The sad part is that it requires an engine-level fix, or a server-side validation of published maps. Not something we - as a community without access to the code - can help in anyway, it's up to Blizzard now.


StarCraft 2 Custom Games list freeze - technical explanation [2024/03]

@TimRots
TimRots / fix.md
Created February 11, 2024 18:03
fix pulseaudio glitching by disabling Timer-based scheduling

fix pulseaudio glitching by disabling Timer-based scheduling in /etc/pulse/default.pa

--- default.pa.orig	2024-02-11 18:51:15.415275039 +0100
+++ default.pa	2024-02-06 22:10:08.861560607 +0100
@@ -49,7 +49,7 @@

 ### Automatically load driver modules depending on the hardware available
 .ifexists module-udev-detect.so
-load-module module-udev-detect
@samthor
samthor / safari-nomodule.js
Last active February 14, 2024 02:54
Safari 10.1 `nomodule` support
// UPDATE: In 2023, you should probably stop using this! The narrow version of Safari that
// does not support `nomodule` is probably not being used anywhere. The code below is left
// for posterity.
/**
* Safari 10.1 supports modules, but does not support the `nomodule` attribute - it will
* load <script nomodule> anyway. This snippet solve this problem, but only for script
* tags that load external code, e.g.: <script nomodule src="nomodule.js"></script>
*
* Again: this will **not** prevent inline script, e.g.:
@kosamari
kosamari / _ServiceWorker_for_github_pages.md
Last active April 1, 2024 05:44
ServiceWorker for github pages.

ServiceWorker for github pages

This is a ServiceWorker template to turn small github pages into offline ready app.

Why ?

Whenever I make small tools & toys, I create github repo and make a demo page using github pages (like this one).
Often these "apps" are just an index.html file with all the nessesary CSS and JavaScript in it (or maybe 2-3 html/css/js files). I wanted to cache these files so that I can access my tools offline as well.

Notes

Make sure your github pages have HTTPS enforced, you can check Settings > GitHub Pages > Enforce HTTPS of your repository.

@kevincennis
kevincennis / v8.md
Last active July 3, 2024 18:15
V8 Installation and d8 shell usage

Installing V8 on a Mac

Prerequisites

  • Install Xcode (Avaliable on the Mac App Store)
  • Install Xcode Command Line Tools (Preferences > Downloads)
  • Install depot_tools
    • $ git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
    • $ nano ~/.zshrc
    • Add path=('/path/to/depot_tools' $path)
@CAFxX
CAFxX / log10.c
Last active March 18, 2023 19:30
Fast integer log10 in C
#include <stdint.h>
/*
Fast 64bit integer log10
WARNING: calling ilog10c(0) yields undefined behaviour!
On x64 this compiles down to:
pushq %rbp
@victornpb
victornpb / occurrences.js
Last active June 7, 2023 14:37
Function count the occurrences of substring in a string
/** Function that count occurrences of a substring in a string;
* @param {String} string The string
* @param {String} subString The sub string to search for
* @param {Boolean} [allowOverlapping] Optional. (Default:false)
*
* @author Vitim.us https://gist.github.com/victornpb/7736865/edit
* @see Unit Test https://jsfiddle.net/Victornpb/5axuh96u/
* @see http://stackoverflow.com/questions/4009756/how-to-count-string-occurrence-in-string/7924240#7924240
*/
function occurrences(string, subString, allowOverlapping) {
@mathiasbynens
mathiasbynens / .gitignore
Last active February 5, 2023 08:47
Generating a regular expression to match valid JavaScript identifiers (like https://mathiasbynens.be/demo/javascript-identifier-regex) in Node.js
package-lock.json
node_modules