Skip to content

Instantly share code, notes, and snippets.

[u@kakuna:~]$ ip a show dev enp4s0
2: enp4s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 00:1c:23:xx:xx:37 brd ff:ff:ff:ff:ff:ff
inet 10.0.141.112/26 scope global enp4s0
valid_lft forever preferred_lft forever
[u@kakuna:~]$ ping 10.0.141.89
PING 10.0.141.89 (10.0.141.89) 56(84) bytes of data.
64 bytes from 10.0.141.89: icmp_seq=1 ttl=255 time=0.245 ms
64 bytes from 10.0.141.89: icmp_seq=2 ttl=255 time=0.194 ms
@lheckemann
lheckemann / cursor-shape.vim
Last active April 16, 2018 15:26
get vim to set cursor shape
if exists("$TMUX")
" normal mode: default cursor
let &t_EI = "\<Esc>[0 q"
" insert mode: vertical line
let &t_SI = "\<Esc>[6 q"
" replace mode: underline
let &t_SR = "\<Esc>[3 q"
endif
@lheckemann
lheckemann / gist:31585e985fdd11eb7cd247584a78cffc
Last active April 25, 2018 10:32
Create NixOS installation image with ZFS support
#!/bin/sh
# (first install nix; curl https://nixos.org/nix/install | sh)
cat > /tmp/nixos-with-zfs-image.nix <<EOF
(import <nixpkgs/nixos> {
configuration = {
imports = [ <nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix> ];
boot.supportedFilesystems = [ "zfs" ];
};
}).config.system.build.isoImage
EOF
Compiling gkrust v0.1.0 (file:///build/mozilla-release-239e434d6d2b8e1e2b697c3416d1e96d48fe98e5/toolkit/library/rust)
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
error: Could not compile `gkrust`.
U-Boot 2018.03 (Mar 13 2018 - 12:02:19 +0000)
DRAM: 3 GiB
WARNING: Caches not enabled
In: pl011@9000000
Out: pl011@9000000
Err: pl011@9000000
Net: No ethernet found.
Hit any key to stop autoboot: 0
scanning bus for devices...
###### ERROR - Could not open OUTFILE: Too many open files
aieeeeeeeeeeeee: outfile=NULL
curl END: # of running threads: 687
###### ERROR - Could not open OUTFILE: Too many open files
aieeeeeeeeeeeee: outfile=NULL
(tangogps:29836): GLib-ERROR **: Creating pipes for GWakeup: Too many open files
Trace/breakpoint trap
~/.config/nixpkgs/overlays  cat rstudio.nix
self: super: {
myRStudio = self.rstudioWrapper.override {
packages = with self.rPackages; [ devtools ggplot2 dplyr ];
};
}
[linus@sudoku:~]$ grep -o LC_MESSAGES/.*\.qm /tmp/files | sort | uniq # Locale-Dateien auf die konsole versucht zuzugreifen
LC_MESSAGES/kauth5_qt.qm
LC_MESSAGES/kauth5_qt.qm.qm
LC_MESSAGES/kbookmarks5_qt.qm
LC_MESSAGES/kcodecs5_qt.qm
LC_MESSAGES/kcompletion5_qt.qm
LC_MESSAGES/kconfig5_qt.qm
LC_MESSAGES/kcoreaddons5_qt.qm
LC_MESSAGES/kdbusaddons5_qt.qm
LC_MESSAGES/kglobalaccel5_qt.qm
{pkgs, config, lib, ...}: {
services.nginx =
let mkVHost = conf: conf // {
forceSSL = true;
enableACME = true;
};
in {
enable = true;
virtualHosts = {
"virt.sphalerite.org" = mkVHost {
self: super:
{
# Install overlay:
# curl https://gist.githubusercontent.com/LnL7/570349866bb69467d0caf5cb175faa74/raw/3f3d53fe8e8713ee321ee894ecf76edbcb0b3711/lnl-overlay.nix -o ~/.config/nixpkgs/overlays/lnl.nix
userPackages = super.userPackages or {} // {
hello = self.hello;
# add more packages here...
nix-rebuild = super.writeScriptBin "nix-rebuild"