sudo su
echo "net.core.default_qdisc=fq_codel" >> /etc/sysctl.d/bbr.conf
echo "net.ipv4.tcp_congestion_control=bbr" >> /etc/sysctl.d/bbr.conf
#btrfs benchmark for daily used desktop OS |
# 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 |
#!/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 |
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.
# -*- 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 |
#! /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 |