Skip to content

Instantly share code, notes, and snippets.

@morrolinux
morrolinux / instructions.md
Last active April 17, 2025 04:52
FIrefox - Vertical tab bar with auto hide

What to expect

Graphical aspect may vary depending on your choices in following the instructions below, but the end result should look something like this:

immagine

Enable Firefox features

@mosquito
mosquito / README.md
Last active April 13, 2025 18:03
Add doker-compose as a systemd unit

Docker compose as a systemd unit

Create file /etc/systemd/system/[email protected]. SystemD calling binaries using an absolute path. In my case is prefixed by /usr/local/bin, you should use paths specific for your environment.

[Unit]
Description=%i service with docker compose
PartOf=docker.service
After=docker.service
-- Explicitly stating the order of computation `a (b c)` makes this not compile
-- While, if we used a C style, order of computation would be explicit by default `a(b(c))` vs `a(b, c)`
example1 = a b c
where
a first second = first ++ second
b = "hey"
c = " world"
-- Explicitly stating `a (b c)` makes this compile
example2 = a b c
@gip
gip / freedsl.hs
Last active August 29, 2015 14:07
Haskell / Free Monad / How can I do something like this?
data A = A Text
data B = B Text A
data ActionC t next = InsertC t (t -> next)
instance Functor (ActionC t) where
fmap f (InsertC a b)= InsertC a (f . b)
insertC a = liftF (InsertC a id)
proC txt1 txt2 = do
@munro
munro / asyncMap.js
Created July 15, 2011 17:57
Array.prototype.asyncMap
Array.prototype.asyncMap = function (fn, callback) {
var that = this, i, count = 0, errors = [], map = [];
for (i = 0; i < this.length; i += 1) {
(function iter(i) {
fn(that[i], function (err, value) {
err && errors.push(err);
map[i] = value;
count += 1;
if (count === that.length) {
callback(errors.length ? errors : false, map);