CSS Cheatsheet

Links 30 Seconds of CSS A Complete Guide to Flexbox

April 18, 2018  |  🏷️Css

New super light laptop (Ultrabook)

Notes for purchasing a new laptop in 2018 Need to have ~13-14" Computer with ~13" screen 128+ GiB SSD 8+ GiB RAM Around 1.6GHz dual-core Intel Core i5 or better Modern bluetooth Modern Wi-Fi (802.11ac) 1+ USB slot 10+ hours of use At the very least, full HD resolution Nice to have No bezels 256+ GiB SSD 3.5mm headphone jack Some kind of graphics card No fan Backlit keys Possible buys TBD ...

April 14, 2018  | 

Cannot mount cifs-drive over docker with SE-Linux enabled for docker

I have docker container which wants access to a drive on its host, which in turn is mounted with cifs from a server on the local network. If you mount it normally with a -v host:container and try to access it from the container, you get an access denied. If you try the old classic SE-Linux-friendly -v host:container:Z, it will look like this from the container: root@c3ada26b1d90:/# l /data/* /data/backup: ls: cannot access '/data/backup/config.json': Permission denied 27177a66e938a02ae784c0bc9ccd74751a32c00f4fcaee22ef1d78894c70553a-stdin| config.json init-stdin| 27177a66e938a02ae784c0bc9ccd74751a32c00f4fcaee22ef1d78894c70553a-stdout| init-stderr| init-stdout| To make it work, you have to change the SE-Linux-type from cifs_t to something more container-y. In your /etc/fstab, you can mount it like this: ...

LVM: Grow LVM and resize partition

Sometimes your install a distro and it refuses to take up all available space. 1. Find out how much space we got to play with. $ sudo vgdisplay --- Volume group --- VG Name fedora System ID Format lvm2 Metadata Areas 1 Metadata Sequence No 3 VG Access read/write VG Status resizable MAX LV 0 Cur LV 2 Open LV 2 Max PV 0 Cur PV 1 Act PV 1 VG Size <49.00 GiB PE Size 4.00 MiB Total PE 12543 Alloc PE / Size 4860 / 18.98 GiB Free PE / Size 7683 / 30.01 GiB VG UUID cCXkBg-Z8Or-jmmi-avaK-91VW-v3cF-CmhiKD 2. Resize your logical volume of choice to soak up the space $ sudo lvresize --size +30.01G /dev/fedora/root Rounding size to boundary between physical extents: 30.01 GiB. Size of logical volume fedora/root changed from 15.00 GiB (3840 extents) to 45.01 GiB (11523 extents). Logical volume fedora/root successfully resized. 3. Grow your partition XFS Example: ...

Installing a lightweight linux desktop environment with openbox and dwm

These are my installation notes for creating a lightweight linux desktop environment from scratch, which contains only the most necessary applications. I’ll probably update it slightly in the future, when I realize I have missed some application. It will contain both openbox and dwm, as I’m always torn between using a tiling versus a floating window manager. Mostly I prefer tiling ones, but with some applications, they simply don’t work well. ...

Over-ear headphones

Notes for buying new headphones in 2018 Requirements Over-ear headphones Good (great?) sound Possible to wear daily for 6-8 hours Wireless (Nice-to-have) Noice canceling Potential purchases Sony WH-1000XM2 / rting Weight: 275 g Battery Life: 30h Has 3.5mm: Yes Price range: 3.2-4k SEK Wireless: Yes Noice canceling: Yes Sennheiser PXC 550 / rting Weight: 227 g Battery Life: 30h Has 3.5mm: Yes Price range: 2.8-3.9k SEK Wireless: Yes Noice canceling: Yes Bose QuietComfort 35 / rting Weight: 236 g Battery Life: 20h Has 3.5mm: Yes Price range: 3.7-4k SEK Wireless: Yes Noice canceling: Yes Bang & Olufsen Beoplay H9 / rting Weight: 295 g Battery Life: 21h Has 3.5mm: Yes Price range: 3.9-4.8k SEK Wireless: Yes Noice canceling: Yes

February 18, 2018  | 

Django2 (python3) framework documentation collection

Some collected documentation for building a generic page in Django2 (python3) Python language Python3 libraries Framework Django documentation Django documentation - topics Deployment Django and nginx Django and uWSGI Security in Django Performance and Optimization in Django Deployment checklist Example pairing Django/nginx

February 4, 2018  | 

Create database with user

sudo -u postgres createuser USER sudo -u postgres createdb DB sudo -u postgres psql alter user USER with encrypted password 'PASS'; alter database DB owner to USER;

Rocket (rust) backend documentation collection

Some collected documentation for building an API backend in Rocket (rust) Rust language Rust by Example Framework Rocket Documentation Docker Github Page Libraries Chrono - Time and Date Diesel - ORM

Luminous (clojure) backend documentation collection

Some collected documentation for developing in luminous. Clojure docs. Language. Luminous web. Framework. Sweet/Compojure API. Luminous building block for API. Compojure. Building block for Sweet. Swagger. Building block for Sweet. Ring. Building block for Compojure. Schema. Data types and validation. Libraries Buddy-hashers. For hashing, mostly passwords. Guides Restful Clojure