Skip to content

Instantly share code, notes, and snippets.

import (fetchTarball {
url = "https://github.com/NixOS/nixpkgs/archive/b5f5c97f7d67a99b67731a8cfd3926f163c11857.tar.gz";
sha256 = "1m9xb3z3jxh0xirdnik11z4hw95bzdz7a4p3ab7y392345jk1wgm";
}) { config = {}; overlays = [
(self: super: {
haskell = super.haskell // {
packages = super.haskell.packages // {
ghc864 = super.haskell.packages.ghc864.extend (hself: hsuper: {
happy = super.haskell.lib.dontCheck (hsuper.callHackage "happy" "1.19.9" {});
});
(function() {
'use strict';
window.__REACT_DEVTOOLS_GLOBAL_HOOK__ = {
checkDCE: function() {},
supportsFiber: true,
roots: new Set(),
inject() {},
onCommitFiberRoot(rendererID, root) {
const current = root.current;
if (current.memoizedState != null && current.memoizedState.element != null) {
let
all-cabal-hashes-component = name: version: type:
builtins.fetchurl
"https://raw.githubusercontent.com/commercialhaskell/all-cabal-hashes/hackage/${name}/${version}/${name}.${type}";
in self: super: {
haskellPackages = super.haskellPackages.override {
overrides = self: super: {
hackage2nix = name: version:
self.haskellSrc2nix {
name = "${name}-${version}";
<<< Welcome to NixOS 19.09pre-git (x86_64) - ttyS1 >>>
jupiter-stage login: [ OK ] Stopped target Timers.
Stopping Hardware RNG Entropy Gatherer Daemon...
[ Stopping Serial Getty on ttyS1...
Stopping Getty on tty1...
[ OK ] Stopped target Containers.
[ OK ] Stopped S.M.A.R.T. Daemon.
[ OK ] Stopped Hardware RNG Entropy Gatherer Daemon.
var https = require('https');
var util = require('util');
function postToSlack(postData) {
var options = {
method: 'POST',
hostname: 'hooks.slack.com',
port: 443,
path: process.env.SLACK_WEBHOOK
};
with import <nixpkgs> {};
with emacsPackagesNg;
melpaBuild {
pname = "nix-mode";
version = "1.4.0";
recipe = writeText "recipe" ''
(nix-mode
:repo "nixos/nix-mode" :fetcher github
:files ("nix*.el"))
'';
#!/usr/bin/env bash
if swaymsg -t get_outputs | grep 36H03689019; then
echo home dock
swaymsg 'output "Unknown 0x00000000" enable position 0 0 mode 2560x1440@59.951Hz bg ~/wp/"001 - Aalborg.jpg" stretch, output "Unknown BenQ GW2765 36H03689019" enable position 2560 0 mode 2560x1440@59.951Hz bg ~/wp/"002 - Alkali.jpg" stretch, output eDP-1 disable'
~/dotfiles/bin/setdpi.sh 109
systemctl --user restart waybar
elif swaymsg -t get_outputs | grep GH85D7CK1CXL; then
echo work dock
BG='bg /home/yorick/work/share/"01. General/06. Branding/Logo/New Logo & Stationary 2019/logo"/logo-01.png fit '#fdf6e3''
swaymsg 'output eDP-1 enable position 0 1440 scale 2, output DP-3 enable position 0 0 '$BG', output DP-4 enable position 2560 0 '$BG
# get the all-cabal-files .git directory
let
url = "https://github.com/commercialhaskell/all-cabal-files";
displayrev = "e1017e420cf649cb6850d0b499cae591d888a9dd"; # rev of the 'display' branch commit
# 1vnc..x4 = echo -n ${url} | nix-hash --flat --base32 --type sha256
path = "${builtins.getEnv "HOME"}/.cache/nix/gitv2/1vncd1k9gq9imn78zxzp0kf2bphlyph471vsr2wk3sk65xi9w1x4";
in
builtins.deepSeq (builtins.deepSeq
(builtins.fetchGit { inherit url; rev = displayrev; ref = "display"; }) # first: make display branch checkout work
(builtins.fetchGit { inherit url; rev = displayrev; ref = "hackage"; }) # then fetch hackage branch
@yorickvP
yorickvP / acme-sh.nix
Last active September 12, 2019 12:17
acme.sh nix module, written at Serokell
{ config, lib, pkgs, ... }:
let
cfg = config.services.acme-sh;
dnstype = lib.types.enum [ "dns_aws" "dns_dnsimple" ];
submod = with lib; {
domains = mkOption {
type = types.coercedTo (types.listOf types.string)
(f: lib.genAttrs f (x: cfg.dns)) (types.attrsOf dnstype);
default = { "${cfg.mainDomain}" = cfg.dns; };
@yorickvP
yorickvP / atmel.js
Last active May 5, 2019 14:50
atmel pack scraping
const r2 = require('r2')
const $ = require('cheerio')
const unzipper = require('unzipper')
const fs = require('fs')
const BASE = "http://packs.download.atmel.com/"
const preamble = `
from collections import namedtuple, defaultdict
__all__ = ["devices", "devices_by_signature"]