Skip to content

Instantly share code, notes, and snippets.

View workflow's full-sized avatar
⚔️
Compiling!

Florian Peter workflow

⚔️
Compiling!
View GitHub Profile
@thesamesam
thesamesam / xz-backdoor.md
Last active May 4, 2024 09:26
xz-utils backdoor situation (CVE-2024-3094)

FAQ on the xz-utils backdoor (CVE-2024-3094)

This is a living document. Everything in this document is made in good faith of being accurate, but like I just said; we don't yet know everything about what's going on.

Background

On March 29th, 2024, a backdoor was discovered in xz-utils, a suite of software that

@clample
clample / dualboot.md
Last active March 29, 2024 09:03
NixOS Ubuntu Dual Boot

NixOS Ubuntu Dual Boot

Why?

After using NixOS for a year, I've found it to be a great operating system. When the software I need is on nixpkgs, things work out great. When I need to install software from outside of nixpkgs, though, it can become a pain. Trying to figure out the quirks of some closed source application can become pretty complicated. It would be great to package it and contribute it back to nixpkgs, but a lot of the time I just want to have the application working as soon as possible.

Since Ubuntu is a more standard linux distribution, I hope that it's better supported by some of these closed source applications. By dual booting, it's possible to get the best of both worlds.

Alternatives to Dual Booting

@sebastien
sebastien / nix-fishgen.py
Last active May 31, 2021 02:52
Python script that converts Nix's profile bash script to Fish
#!/usr/bin/env python3
# Updated: 2018-10-17
import re, sys, os
"""
Converts the Nix profile SH script to a Fish-compatible profile using a
simple line-by-line replace algorithm.
"""
@ruzickap
ruzickap / headphones.sh
Created March 22, 2018 09:48
Short script which will move all audio (in/out)put to the USB Headphones
#!/bin/bash -eux
HEADSET="alsa_output.usb-Logitech_Logitech_USB_Headset-00.analog-stereo"
HEADSET_MIC="alsa_input.usb-Logitech_Logitech_USB_Headset-00.analog-mono"
#pacmd list-sink-inputs
#pacmd list-source-outputs
pacmd stat | grep -E '^Default (sink|source) name'
@chrisjensen
chrisjensen / singletonFactory.js
Last active December 5, 2019 20:08
How to create singleton associations in FactoryGirl
/**
* For use with https://github.com/aexmachina/factory-girl
*
* Helper for defining an association to a record that should only be instantiated once.
* Uses sequelizes findOrCreate() to ensure the record is created on
* first invocation, and reused subsequently
*
* NOTE: Make sure to use this within a function initialiser or the singleton
* record will be created when factories are defined which may cause confusion
*
@CMCDragonkai
CMCDragonkai / nix_string_and_path_concatenation.md
Last active March 15, 2024 00:21
Nix: String and Path Concatenation #nix #nixos

Nix String and Path Concatenation

From Bas van Dijk:

To understand these things I would recommend using nix-repl:

$ nix-repl
Welcome to Nix version 1.11.2. Type :? for help.
@Isaddo
Isaddo / import-github-labels.js
Last active February 9, 2024 22:44
import github labels via console command
/*
Go on your labels page (https://github.com/user/repo/labels)
Edit the following label array
or
Use this snippet to export github labels (https://gist.github.com/MoOx/93c2853fee760f42d97f)
and replace it
Paste this script in your console
Press Enter!!
@chris-jamieson
chris-jamieson / setup.md
Created April 19, 2016 15:43
Set up Franz for Ubuntu
  • Download Franz for your distribution from MeetFranz.com
  • change into the same directory as the downloaded file, then sudo tar -xf Franz-linux-x64-0.9.10.tgz -C /opt/franz
  • (optional) wget "https://cdn-images-1.medium.com/max/360/1*v86tTomtFZIdqzMNpvwIZw.png" -O franz-icon.png then sudo cp franz-icon.png /opt/franz
  • (optional) sudo touch /usr/share/applications/franz.desktop then sudo vim /usr/share/applications/franz.desktop

paste the following lines into the file, then save the file:

[Desktop Entry]
Name=Franz
Comment=
@dozoisch
dozoisch / linc.sh
Created June 16, 2015 18:11
Run Lint Only on Changed files
git diff -z --name-only --diff-filter=ACMRTUB `git merge-base HEAD master` | xargs -0 eslint
@MoOx
MoOx / index.js
Last active February 9, 2024 22:44
Export/import github labels
// go on you labels pages
// eg https://github.com/cssnext/cssnext/labels
// paste this script in your console
// copy the output and now you can import it using https://github.com/popomore/github-labels !
var labels = [];
[].slice.call(document.querySelectorAll(".label-link"))
.forEach(function(element) {
labels.push({
name: element.textContent.trim(),