- 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)
package-lock.json | |
node_modules |
/** 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) { |
#include <stdint.h> | |
/* | |
Fast 64bit integer log10 | |
WARNING: calling ilog10c(0) yields undefined behaviour! | |
On x64 this compiles down to: | |
pushq %rbp |
This is a ServiceWorker template to turn small github pages into offline ready app.
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.
Make sure your github pages have HTTPS enforced, you can check Settings > GitHub Pages > Enforce HTTPS
of your repository.
// 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.: |
--- 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
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.