Skip to content

Instantly share code, notes, and snippets.

View Stefanomarton's full-sized avatar

Stefano Marton Stefanomarton

View GitHub Profile
@braindevices
braindevices / #btrfs benchmark for daily used desktop OS
Last active August 5, 2025 18:30
which file sytem to use for daily work? should we turn on btrfs compression?
#btrfs benchmark for daily used desktop OS
@kborling
kborling / configuration.nix
Created December 24, 2021 23:59
NixOS Configuration (Sway/Wayland Enabled)
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, pkgs, ... }:
{
nix = {
package = pkgs.nixUnstable;
extraOptions = ''
;;(advice-add #'vertico--display-candidates :around #'my-display)
;;(advice-add #'vertico--resize-window :around #'no-resize-vertico)
;;(defun no-resize-vertico (&rest _))
;; TODO open issues:
;; DONE cursor in minibuffer is still shown
;; DONE vertico--exhibit/consult--refresh-hook should be hooked into, in order to ensure that resize works
;; TODO recursive minibuffers
@epyonavenger
epyonavenger / arch_enable_bbr.md
Last active March 22, 2025 03:21 — forked from sendya/ArchLinux_Kernel4.13_enable_BBR.sh
Arch Linux - Enable BBR

Enabling BBR On Arch Linux 6.5.5+

Become Root
  • sudo su
Set Up sysctl Config File
  • echo "net.core.default_qdisc=fq_codel" >> /etc/sysctl.d/bbr.conf
  • echo "net.ipv4.tcp_congestion_control=bbr" >> /etc/sysctl.d/bbr.conf
Load Module
@Blaradox
Blaradox / brightnessControl.sh
Created September 23, 2018 03:47
Notifications for brightness and volume, using dunstify
#!/usr/bin/env bash
# You can call this script like this:
# $ ./brightnessControl.sh up
# $ ./brightnessControl.sh down
# Script inspired by these wonderful people:
# https://github.com/dastorm/volume-notification-dunst/blob/master/volume.sh
# https://gist.github.com/sebastiencs/5d7227f388d93374cebdf72e783fbd6a

About

I came up with these exercises for someone learning to code. But I thought more people might want to do them.

I like functional programming, so the exercises asks you to make functions that are common in functional programming. If you have learned a language, but want to learn more about functional programming, these exercises are for you.

The exercises were originally meant for Python, but doing them in JavaScript, Ruby or any Lisp (Scheme, Clojure, …) should work just as well. It should also be possible to do them in Java and C#, but it will probably not be as easy.

Most of the functions you are asked to create already exist in functional languages, or libraries for most languages. But it can be educational to implement them yourself.

@TauPan
TauPan / config.py
Last active February 7, 2024 20:31
My current qtile config
# -*- coding: utf-8 -*-
import distutils.spawn
import os
import re
import socket
import subprocess
import xcffib.xproto
from libqtile import layout, bar, widget, hook
from libqtile.command import lazy
@cedricbonhomme
cedricbonhomme / getfit.py
Created November 16, 2014 00:11
Get your Google Fit data
#! /usr/bin/env python
#-*- coding: utf-8 -*-
import json
import httplib2
from datetime import datetime
from apiclient.discovery import build
from oauth2client.client import OAuth2WebServerFlow