Skip to content

Instantly share code, notes, and snippets.

@fabswt
fabswt / watchdir.sh
Last active February 23, 2024 19:26
Watch a directory using bash and inotifywait
#!/bin/sh
# Usage
#
# Call the script with the directory you want to watch as an argument. e.g.:
# watchdir.sh /app/foo/
#
#
# Description:
# Uses inotifywait to look for new files in a directory and process them:
@akmeghdad
akmeghdad / workbench.tree.css 1.41.0 (+)
Last active December 20, 2023 12:02
workbench.main.css for VS code
/* ==================== */
/* VScode 1.41.0 AND UP */
/* ==================== */
/* https://gist.github.com/akmeghdad/b1208c2caa601f0ba29f953faabac709 */
/* THANKS OF */
/* https://gist.github.com/samdenty/b96f4df576d05cb123248f8ebfa899b6 */
/* https://gist.github.com/Lightfire228/39dc2cf403237a190e79a000912691b2 */
/* ==> VScode 1.38 + */
/* [WINDOWS] add this code in %USERPROFILE%\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\workbench.desktop.main.css */
/* ==> VScode 1.31 to 1.37 */
@branneman
branneman / prototypal-inheritance.js
Last active October 18, 2021 06:18
ES3 & ES5 — Prototypal Inheritance
/**
* Parent
*/
function Shape(x, y) {
this.x = x;
this.y = y;
}
Shape.prototype.constructor = Shape;
Shape.prototype.pos = function() {
return [this.x, this.y];