Skip to content

Instantly share code, notes, and snippets.

View matthewbauer's full-sized avatar

Matthew Bauer matthewbauer

View GitHub Profile
-- This is showing how hard it is to do "live migrations" when you use domain constraints.
-- The ALTER TABLE below looks pretty harmless but, depending on how big your table is, can
-- cause downtime as Postgres rechecks the whole table.
SET statement_timeout TO 0;
DROP TABLE IF EXISTS users;
DROP EVENT TRIGGER IF EXISTS warn_on_table_rewrite;
DROP DOMAIN IF EXISTS non_empty_text_299;
@matthewbauer
matthewbauer / .gitattributes
Last active October 27, 2020 19:36
User config example
*.c diff=cpp
*.h diff=cpp
*.c++ diff=cpp
*.h++ diff=cpp
*.cpp diff=cpp
*.hpp diff=cpp
*.cc diff=cpp
*.hh diff=cpp
*.cs diff=csharp
*.css diff=css
#!/usr/bin/env python3
import urllib.request
urlAbsenteeCounty = 'https://s3.amazonaws.com/dl.ncsbe.gov/ENRS/2020_11_03/absentee_counts_county_20201103.csv'
with urllib.request.urlopen(urlAbsenteeCounty) as response:
data = response.read()
lines = data.decode('utf-8').split("\n")
demTotal = 0
unaTotal = 0
###############################
## Dell XPS 15 9570 (0x087C) ##
###############################
{ config, lib, pkgs, ... }:
{
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
boot.kernelModules = [ "kvm-intel" "i915" ];
boot.kernelParams = [
// Generated by Molecule 0.5.0
#define MOLECULEC_VERSION 5000
#define MOLECULE_API_VERSION_MIN 5000
#include "molecule_reader.h"
#include "molecule_builder.h"
#ifndef CC_H
#define CC_H
# Usage: $ nix eval "(builtins.attrNames (import (builtins.fetchurl "https://matthewbauer.us/generate-versions.nix") {}).emacs)"
# $ nix run "(import (builtins.fetchurl "https://matthewbauer.us/generate-versions.nix") {}).emacs.\"24.3\"" -u LANG -c emacs
{ channels ? [ "19.03" "18.09" "18.03" "17.09" "17.03"
"16.09" "16.03" "15.09" "14.12" "14.04" "13.10" ]
, attrs ? builtins.attrNames (import <nixpkgs> {})
, system ? builtins.currentSystem
, args ? { inherit system; }
}: let
getSet = channel: (import (builtins.fetchTarball "channel:nixos-${channel}") args).pkgs;
NameYear started# of packages% up-to-date
Nixpkgs20034562481.6%
FreeBSD Ports19942704676.6%
Debian19943056566.5%
Red Hat19972224074.1%
Gentoo20021919365.0%
openSUSE19971180374.2%
pkgsrc19971449563.7%
Arch2002886087.6%
diff --git a/pkgs/development/libraries/gmp/6.x.nix b/pkgs/development/libraries/gmp/6.x.nix
index f320c303123..11453cb61af 100644
--- a/pkgs/development/libraries/gmp/6.x.nix
+++ b/pkgs/development/libraries/gmp/6.x.nix
@@ -30,7 +30,7 @@ let self = stdenv.mkDerivation rec {
# See <http://hydra.nixos.org/build/2760931>, for instance.
#
# no darwin because gmp uses ASM that clang doesn't like
- (stdenv.lib.enableFeature (!stdenv.isSunOS && stdenv.hostPlatform.isx86) "fat")
+ (stdenv.lib.enableFeature (!stdenv.isSunOS && stdenv.hostPlatform.isx86 && !stdenv.hostPlatform.isiOS) "fat")

Proposed Nixpkgs Rules

  • Mission statement: to package the latest, stable version of all of the world’s open source software with a living maintainer.
  • Other software is allowed on a case by case basis. Possible exceptions include, but not limited to:
    • Popular closed-source applications without a good alternative.
    • Older software that is required as a dependency of other packages.
{
ghc6104 = (import (builtins.fetchTarball "channel:nixos-17.09") {}).haskell.compiler.ghc6104;
ghc6121 = (import (builtins.fetchTarball "channel:nixos-14.04") {}).pkgs.haskell.packages_ghc6121.ghc;
ghc6122 = (import (builtins.fetchTarball "channel:nixos-14.04") {}).pkgs.haskell.packages_ghc6122.ghc;
ghc6123 = (import (builtins.fetchTarball "channel:nixos-17.09") {}).haskell.compiler.ghc6123;
ghc701 = (import (builtins.fetchTarball "channel:nixos-14.04") {}).pkgs.haskell.packages_ghc701.ghc;
ghc702 = (import (builtins.fetchTarball "channel:nixos-14.04") {}).pkgs.haskell.packages_ghc702.ghc;
ghc703 = (import (builtins.fetchTarball "channel:nixos-14.04") {}).pkgs.haskell.packages_ghc703.ghc;
ghc704 = (import (builtins.fetchTarball "channel:nixos-18.03") {}).haskell.compiler.ghc704;
ghc721 = (import (builtins.fetchTarball "channel:nixos-14.04") {}).pkgs.haskell.packages_ghc721.ghc;