Skip to content

Instantly share code, notes, and snippets.

View purpleidea's full-sized avatar

James purpleidea

View GitHub Profile
.
├── 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
# 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 December 23, 2019 18:41 — forked from dysinger/config.org
My important dotfiles as an org-mode document

Configuration

Setup

git clone \
    https://github.com/chriskempson/base16-shell.git \
// 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 February 22, 2019 15:14
This program filters golang stack traces.
#!/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.
#
@purpleidea
purpleidea / exit_notify.go
Created February 20, 2019 11:02 — forked from pmalmgren/LICENSE
Go proc connector example, detects when a process exits
package main
import (
"bytes"
"encoding/binary"
"fmt"
"golang.org/x/sys/unix"
"os"
"syscall"
)
@purpleidea
purpleidea / 1-output.txt
Created January 23, 2019 12:11 — forked from jordansissel/1-output.txt
Convert curl|bash to an rpm with Docker and FPM
% docker build -t rust .
...
# Export the image to tarball, which itself contains tarballs and a manifest.json
% docker save -o rust.tar rust
# Extract the last layer
# tar's -O flag extracts a single entry from the tarball.
# The file we want is the last "Layer" in the manifest.json
% tar -xf rust.tar -O $(tar -xf rust.tar -O manifest.json | jq -r '.[].Layers[-1]') > curlbash.tar
@purpleidea
purpleidea / copy.go
Created December 13, 2018 06:58 — forked from r0l1/copy.go
Copy a directory tree (preserving permissions) in Go.
/* MIT License
*
* Copyright (c) 2017 Roland Singer [roland.singer@desertbit.com]
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
@purpleidea
purpleidea / readme.md
Created November 27, 2018 11:18 — forked from dominictarr/readme.md
statement on event-stream compromise

Hey everyone - this is not just a one off thing, there are likely to be many other modules in your dependency trees that are now a burden to their authors. I didn't create this code for altruistic motivations, I created it for fun. I was learning, and learning is fun. I gave it away because it was easy to do so, and because sharing helps learning too. I think most of the small modules on npm were created for reasons like this. However, that was a long time ago. I've since moved on from this module and moved on from that thing too and in the process of moving on from that as well. I've written way better modules than this, the internet just hasn't fully caught up.

@broros

otherwise why would he hand over a popular package to a stranger?

If it's not fun anymore, you get literally nothing from maintaining a popular package.

One time, I was working as a dishwasher in a restu

@purpleidea
purpleidea / capslock_super_esc.md
Created November 18, 2018 01:30 — forked from bendavis78/capslock_super_esc.md
Mapping Caps Lock to simultaneous Esc and Super (Mod4)

Mapping Caps Lock to simultaneous Esc and Super (Mod4)

The CAPS key can be mapped to an escape key when pressed once, and a super (mod4) key when used in combination with other keys.

Create the file /usr/share/X11/xkb/symbols/custom_opts with the following:

// Make Caps an additional Escape
hidden partial modifier_keys
xkb_symbols "super_esc" {

key { [ Escape ] };