Skip to content

Instantly share code, notes, and snippets.

View francium's full-sized avatar

francium

View GitHub Profile
@francium
francium / gist:d93bcf75884ebeea216cc04cee0e2b9d
Created February 10, 2019 18:21
xrandr scripts to configure fractional scaling and multi-monitors setups (work in X only)
#!/bin/bash
# Builtin display (1440p)
xrandr --output eDP-1 --fb 3840-x2160 --auto --scale 1.5x1.5
-------------------------------------------------------------
#!/bin/bash
# Dual monitor (dual external 1080p)
@francium
francium / two_queue.py
Created September 20, 2018 01:32
Two Queue simluation example
import logging
from math import inf, log
from random import random as rand
log_format ='%(asctime)s.%(msecs)03d %(levelname)8s [%(module)s %(funcName)s] %(message)s'
datefmt ="%Y-%m-%d %H:%M:%S"
logger_level = logging.WARN
logging.basicConfig(level=logger_level, format=log_format, datefmt=datefmt)
logger = logging.getLogger(__name__)
function! ToggleBackgroundDarkness()
if &background ==# "light"
set background=dark
else
set background=light
endif
endfunction
map <F8> :call ToggleBackgroundDarkness()<CR>