Skip to content

Instantly share code, notes, and snippets.

View kmikko's full-sized avatar

Mikko Korhonen kmikko

View GitHub Profile
@kmikko
kmikko / git-fix-commit-author-email.md
Created November 23, 2021 10:53
Changing the Git history of your repository using a script

https://help.github.com/en/github/using-git/changing-author-info

Changing author info

To change the name and/or email address recorded in existing commits, you must rewrite the entire history of your Git repository.

Warning: This action is destructive to your repository's history. If you're collaborating on a repository with others, it's considered bad practice to rewrite published history. You should only do this in an emergency.

Changing the Git history of your repository using a script

@kmikko
kmikko / nbsp-wayland.md
Created March 2, 2020 14:15
Disable non-breaking space in Wayland

Disable non-breaking space in Wayland

To disable non-breaking space, e.g. AltGr + Spacebar, one can issue:

setxkbmap -option "nbsp:none"

This fixes it for programs like vscode but GNOME doesn't honor it. To fix that dump dconf settings for input-sources:

dconf dump /org/gnome/desktop/input-sources/ > input-sources.dconf

Open input-sources.dconf with editor and add 'nbsp:none' to xkb-options list so that you'll end up with something like:

@kmikko
kmikko / main.dart
Last active February 26, 2020 08:39
import 'dart:convert';
void main() {
var jsonData = '{ "id": 1, "name": "Pena", "skills": ["C", "Java", "Kobol"] }';
User user = User.fromJson(jsonDecode(jsonData));
}
class User {
User(this.id, this.name, this.skills);

Post-installation

Set keyboard layout

sudo localectl set-keymap fi

Connect to Wi-Fi

sudo wifi-menu
@kmikko
kmikko / 1_Arch_installation.md
Last active March 10, 2024 02:36
Arch Linux installation guide with LVM on LUKS

Arch Linux Installation Guide

Create bootable USB

Download Arch Linux iso file: https://www.archlinux.org/download/

Plug and identify your USB flash drive

lsblk

Unmount if necessary

@kmikko
kmikko / gist:c7c46979d300d98e290227110b35e34e
Created July 19, 2016 11:47
Fish shell, check for .nvmrc file
# ~/.config/fish/functions/check_nvmrc.fish
function check_nvmrc --on-variable PWD
if test -e .nvmrc
eval "nvm use"
end
end
# ~/.config/fish/fish.config
source ~/.config/fish/functions/check_nvmrc.fish