Skip to content

Instantly share code, notes, and snippets.

Ivan Kozik ivan

Block or report user

Report or block ivan

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:29429a8fc04b7e356332b7225ba3b241
# nix-env --builders '' -f ~/code/system/nixpkgs -iA nodejs-12_x
installing 'nodejs-12.10.0'
warning: ignoring the user-specified setting 'auto-optimise-store', because it is a restricted setting and you are not a trusted user
warning: ignoring the user-specified setting 'require-sigs', because it is a restricted setting and you are not a trusted user
warning: ignoring the user-specified setting 'sandbox', because it is a restricted setting and you are not a trusted user
warning: ignoring the user-specified setting 'trusted-substituters', because it is a restricted setting and you are not a trusted user
warning: ignoring the user-specified setting 'trusted-users', because it is a restricted setting and you are not a trusted user
...
@ivan
ivan / konsole-focus-tab-to-the-right-on-close.patch
Created Sep 2, 2019
Fix konsole behavior on tab close: don't focus the most-recently-used tab; focus the tab to the right instead
View konsole-focus-tab-to-the-right-on-close.patch
diff --git a/src/ViewManager.cpp b/src/ViewManager.cpp
index ebceaeed..7e31fbea 100644
--- a/src/ViewManager.cpp
+++ b/src/ViewManager.cpp
@@ -507,8 +507,7 @@ void ViewManager::focusAnotherTerminal(ViewSplitter *toplevelSplitter)
}
}
} else if (_terminalDisplayHistory.count() >= 1) {
- // Give focus to the last used terminal tab
- switchToTerminalDisplay(_terminalDisplayHistory[0]);
@ivan
ivan / nixpkgs.patch
Created Aug 29, 2019
Let hardened NixOS run 32-bit executables
View nixpkgs.patch
From 0554a382fc0e0a31a12dabe2e09c4fae3388d0e9 Mon Sep 17 00:00:00 2001
From: Ivan Kozik <ivan@ludios.org>
Date: Thu, 20 Dec 2018 00:34:04 +0000
Subject: [PATCH] hardened kernel: keep support for 32-bit executables
NixOS relies on them: https://github.com/NixOS/nixpkgs/issues/51097
We also use 32-bit foobar2000 and some 32-bit games.
---
pkgs/os-specific/linux/kernel/hardened-config.nix | 1 -
View xfceUnstable.patch
diff --git a/nixos/modules/services/x11/desktop-managers/xfce.nix b/nixos/modules/services/x11/desktop-managers/xfce.nix
index 98a813480c9..ef2c87b6d37 100644
--- a/nixos/modules/services/x11/desktop-managers/xfce.nix
+++ b/nixos/modules/services/x11/desktop-managers/xfce.nix
@@ -47,7 +47,7 @@ in
};
config = mkIf cfg.enable {
- environment.systemPackages = with pkgs.xfce // pkgs; [
+ environment.systemPackages = with pkgs.xfceUnstable // pkgs; [
View gist:b1dc4aaa56981c222e10885cbedb2390
This file has been truncated, but you can view the full file.
000000013.itch.io
0011.itch.io
0014x.itch.io
0038-studios.itch.io
00dogecubegamer00.itch.io
00george.itch.io
00mob.itch.io
00vz00.itch.io
01010111.itch.io
@ivan
ivan / gist:c4d6ba9a9773c13e63e2563ce8c0f8e2
Created Jun 21, 2019
DNS resolver settings for NixOS
View gist:c4d6ba9a9773c13e63e2563ce8c0f8e2
networking = {
# Don't try to find our domain name or DNS servers because then
# resolvconf will insert them into /etc/resolv.conf
dhcpcd.extraConfig =
''
nooption domain_name_servers, domain_name, domain_search, host_name
nooption ntp_servers
'';
nameservers = [
"1.1.1.1"
View gist:92b54f512323bea722f7d9901af70695
sed -i -e '1i#ifndef __clang_analyzer__' -e '$a#endif' "src/Library/IPC/Message.pb.cc"
sed -i -e '1i#ifndef __clang_analyzer__' -e '$a#endif' "src/Library/IPC/Exception.pb.cc"
sed -i -e '1i#ifndef __clang_analyzer__' -e '$a#endif' "src/Library/IPC/Rule.pb.cc"
sed -i -e '1i#ifndef __clang_analyzer__' -e '$a#endif' "src/Library/IPC/Parameter.pb.cc"
sed -i -e '1i#ifndef __clang_analyzer__' -e '$a#endif' "src/Library/IPC/Devices.pb.cc"
sed -i -e '1i#ifndef __clang_analyzer__' -e '$a#endif' "src/Library/IPC/Policy.pb.cc"
a2x: WARNING: --destination-dir option is only applicable to HTML based outputs
a2x: WARNING: --destination-dir option is only applicable to HTML based outputs
a2x: WARNING: --destination-dir option is only applicable to HTML based outputs
a2x: WARNING: --destination-dir option is only applicable to HTML based outputs
@ivan
ivan / zshrc.sh
Last active Jun 19, 2019
Interactively pick and attach to a tmux session based on its output
View zshrc.sh
rpick() {
session=$(for i in $(tmux list-sessions -F '#S'); do
echo -e -n "$i\t"; { { tmux capture-pane -p -t "$i" | tr '\n' ' ' } || true }
echo
done | fzf --exact --reverse | cut -f 1)
if [[ "$session" != "" ]]; then
tmux attach -t "$session"
fi
}
View fonts.conf.xml
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<!-- Don't use embedded bitmap in Cambria and other fonts: https://bugzilla.mozilla.org/show_bug.cgi?id=722356#c6 -->
<match target="font">
<edit mode="assign" name="embeddedbitmap">
<bool>false</bool>
</edit>
</match>
<!-- Use the correct antialiasing and hinting settings -->
You can’t perform that action at this time.