Skip to content

Instantly share code, notes, and snippets.

View fotonmoton's full-sized avatar

Gregory fotonmoton

  • Ukraine
View GitHub Profile
@giuseppe998e
giuseppe998e / gdm-fractional_scaling.md
Last active September 8, 2024 07:11
GDM - Setup display fractional scaling
  1. Check if you are running X11 or Wayland:
    • echo $XDG_SESSION_TYPE
  2. Copy your monitors.xml config file into GDM home directory:
    • sudo cp ~/.config/monitors.xml ~gdm/.config/monitors.xml
    • sudo chown gdm:gdm ~gdm/.config/monitors.xml
  3. Access GDM's shell:
    • sudo machinectl shell gdm@ /bin/bash
  4. Enable scale-monitor-framebuffer experimental feature:
    • On Wayland: gsettings set org.gnome.mutter experimental-features "['scale-monitor-framebuffer']"
  • On X11: gsettings set org.gnome.mutter experimental-features "['x11-randr-fractional-scaling']"
@tkrotoff
tkrotoff / ReactNative-vs-Flutter.md
Last active May 14, 2025 15:15
React Native vs Flutter
@tschaub
tschaub / tools-as-depdendencies.md
Last active September 29, 2024 14:00
Reproducible module builds with tools (commands) as dependencies

Tools as dependencies

This example is a slight tweak on the best-practices example for working with Go modules as development dependencies.

The downside of the existing example is that someone who git clones your module to make a contribution, would not be able to run go generate (without extra work).

$ go generate
painkiller.go:5: running "stringer": exec: "stringer": executable file not found in $PATH
@tkrotoff
tkrotoff / FrontendFrameworksPopularity.md
Last active July 8, 2025 04:41
Front-end frameworks popularity (React, Vue, Angular and Svelte)
@firmanelhakim
firmanelhakim / download_vagrant_box.sh
Last active June 17, 2025 07:14
How to Download Vagrant Box Manually
/* this is the box (and the version) that we want to download from: https://app.vagrantup.com/debian/boxes/jessie64 */
wget https://app.vagrantup.com/debian/boxes/jessie64/versions/8.9.0/providers/virtualbox.box -O debian-jessie64-8.9.0.box
/* add the box to vagrant */
vagrant box add debian/jessie64 debian-jessie64-8.9.0.box
/* update box version */
cd ~/.vagrant.d/boxes/debian-VAGRANTSLASH-jessie64/
mv 0 8.9.0
@EQuimper
EQuimper / git-aliases.md
Created June 1, 2017 01:40 — forked from mwhite/git-aliases.md
The Ultimate Git Alias Setup

The Ultimate Git Alias Setup

If you use git on the command-line, you'll eventually find yourself wanting aliases for your most commonly-used commands. It's incredibly useful to be able to explore your repos with only a few keystrokes that eventually get hardcoded into muscle memory.

Some people don't add aliases because they don't want to have to adjust to not having them on a remote server. Personally, I find that having aliases doesn't mean I that forget the underlying commands, and aliases provide such a massive improvement to my workflow that it would be crazy not to have them.

The simplest way to add an alias for a specific git command is to use a standard bash alias.

# .bashrc
@odewahn
odewahn / error-handling-with-fetch.md
Last active June 9, 2024 14:27
Processing errors with Fetch API

I really liked @tjvantoll article Handling Failed HTTP Responses With fetch(). The one thing I found annoying with it, though, is that response.statusText always returns the generic error message associated with the error code. Most APIs, however, will generally return some kind of useful, more human friendly message in the body.

Here's a modification that will capture this message. The key is that rather than throwing an error, you just throw the response and then process it in the catch block to extract the message in the body:

fetch("/api/foo")
  .then( response => {
    if (!response.ok) { throw response }
    return response.json()  //we only get here if there is no error
 })
@wesbos
wesbos / gist:0d5572a29e4f5688a1c8
Last active September 1, 2023 17:59
Handy list of widths to target in a responsive website
320
321
322
323
324
325
326
327
328
329
@kasperpeulen
kasperpeulen / README.md
Last active March 14, 2025 13:39
How to pretty-print JSON using Dart.
@PurpleBooth
PurpleBooth / README-Template.md
Last active July 6, 2025 08:17
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites