Skip to content

Instantly share code, notes, and snippets.

@purpleidea
purpleidea / gist:74354dd7fa5afd5005e2525618cea47e
Created Aug 26, 2021
horrible-gnome-alt-tab-off-by-one-regression
View gist:74354dd7fa5afd5005e2525618cea47e
Finally reproduced a horrible GNOME shell regression that's been plaguing me and a bunch of friends for a while now.
Step 1)
Open up gedit. Put it on workspace 1 (for example, doesn't matter)
Step 2)
Open up firefox or some other app and put it on workspace 2. Also open up calculator on the same workspace.
Step 3)
Hit some shortcut to open up a new gedit window.
@purpleidea
purpleidea / README.md
Created Mar 5, 2021 — forked from danbst/README.md
[Linux] [Firefox] Open link in browser, which is in current workspace
View README.md

I use separate Firefox profiles for work and personal stuff. To distinguish those I place them on different workspaces.

  • Workspace 0: firefox --no-remote -P MyJob
  • Workspace 1: firefox --no-remote -P default

I have also company Slack on Workspace 0. Which usually contains links to some work stuff.

The problem

@purpleidea
purpleidea / frebib.mcl
Created Mar 2, 2021
automatic grouping example
View frebib.mcl
# this doesn't work of course...
docker:container "mgmt-nginx" {
volumes => {
"/steve" => struct{type => "volume", source => "steve",},
"/tmp" => struct{type => "tmpfs",},
},
}
# but these three *could* work!
docker:container "mgmt-nginx" {
@purpleidea
purpleidea / main.go
Created Feb 27, 2021 — forked from paulzhol/main.go
golang.org/x/sys/unix.Signalfd usage example (Linux)
View main.go
// +build linux
package main
import (
"flag"
"log"
"os"
"runtime"
"time"
View find
# case insensitive find, eg: ifind <pattern>[ dir1[ dir2[ dirN...]]]
function ifind() {
pat="$1"
shift
if [ "$#" = "0" ]; then
set "."
fi
for d in "$@"; do
#find "$d" -iname "*$pat*" # normal
find "$d" -iname "*$pat*" 2> /dev/null # hide can't read errors
View gist:d876a819b4b72a3752825dbd54fdb4c0
.
├── 11.06-00
│   ├── disk
│   │   ├── deleteOldVersion.sh
│   │   ├── install.csh
│   │   ├── Lib_Utils-1.00-09.noarch.rpm
│   │   ├── Lib_Utils2-1.00-01.noarch.rpm
│   │   ├── LSI-AdapterSASIR.mib
│   │   ├── LSI-AdapterSAS.mib
│   │   ├── MegaCli-8.02.14-1.i386.rpm
View gist:ee1ea1be6183eb4ef60006a2da0b3891
# dnf system-upgrade download --refresh --releasever=32
Before you continue ensure that your system is fully upgraded by running "dnf --refresh upgrade". Do you want to continue [y/N]: y
Fedora Modular 32 - x86_64 996 kB/s | 4.9 MB 00:05
Fedora Modular 32 - x86_64 - Updates 992 kB/s | 3.5 MB 00:03
Fedora 32 - x86_64 - Updates 1.0 MB/s | 20 MB 00:19
Fedora 32 - x86_64 972 kB/s | 70 MB 01:13
RPM Fusion for Fedora 32 - Free - Updates 415 kB/s | 590 kB 00:01
RPM Fusion for Fedora 32 - Free 481 kB/s | 679 kB 00:01
RPM Fusion for Fedora 32 - Nonfree - Updates 150 kB/s | 125 kB 00:00
RPM Fusion for Fedora 32 - Nonfree 238 kB/s | 225 kB 00:00
@purpleidea
purpleidea / config.org
Created Dec 23, 2019 — forked from dysinger/config.org
My important dotfiles as an org-mode document
View config.org

Configuration

Setup

git clone \
    https://github.com/chriskempson/base16-shell.git \
View sysctl.go
// Mgmt
// Copyright (C) 2013-2018+ James Shubin and the project contributors
// Written by James Shubin <james@shubin.ca> and the project contributors
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
@purpleidea
purpleidea / filter-golang-stack.py
Created Feb 22, 2019
This program filters golang stack traces.
View filter-golang-stack.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2019+ James Shubin
# Written by James Shubin <james@shubin.ca>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#