Skip to content

Instantly share code, notes, and snippets.

@whipsch
whipsch / nixos-infect.sh
Last active February 5, 2019 18:09
nixos-infect patched for no swap
#! /usr/bin/env bash
# More info at: https://github.com/elitak/nixos-infect
set -e -o pipefail
makeConf() {
# Skip everything if main config already present
[[ -e /etc/nixos/configuration.nix ]] && return 0
# NB <<"EOF" quotes / $ ` in heredocs, <<EOF does not

Keybase proof

I hereby claim:

  • I am whipsch on github.
  • I am whipsch (https://keybase.io/whipsch) on keybase.
  • I have a public key ASBSJB5lyOoO9cTfDmCnwEKiHcBkZTdgCnVU1JA0qoaVFgo

To claim this, I am signing this object:

@whipsch
whipsch / backtrace
Created January 6, 2016 02:37
rustc stable 1.5.0, beta, 1.6.0-beta.1, 1.7.0-nightly (d5e229057) ICE, `-Z unstable-options --pretty normal src/lib.rs`
thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', ../src/libcore/option.rs:366
stack backtrace:
1: 0x7f2723300d70 - sys::backtrace::tracing::imp::write::h1fe79f3711caca0eUnt
2: 0x7f2723307685 - panicking::log_panic::_<closure>::closure.39701
3: 0x7f27233070f5 - panicking::log_panic::hffc6d029fed602571nx
4: 0x7f27232ca663 - sys_common::unwind::begin_unwind_inner::h7045c1c64d9ab8edYgs
5: 0x7f27232cafc8 - sys_common::unwind::begin_unwind_fmt::h40ee994bfe85f7a54fs
6: 0x7f27232fec31 - rust_begin_unwind
7: 0x7f272335226f - panicking::panic_fmt::h4c8d12e3c05f3b8cZEK
8: 0x7f272334c818 - panicking::panic::hb8a57f0c8013c90awDK
// ==UserScript==
// @name gist-rust-playpen
// @description Adds a Rust Playpen button to Gists that contain a Rust file.
// @namespace whipsch
// @include https://gist.github.com/*
// @version 1
// @grant none
// ==/UserScript==
if (document.querySelector("div.file > div.type-rust")) {
@whipsch
whipsch / really.js
Last active August 29, 2015 14:23
just one more test
console.log("for real")
@whipsch
whipsch / testing.md
Created June 27, 2015 06:56
yet another test
what
  • woo

  • hoo

  • cool

    some code in here

@whipsch
whipsch / testing.md
Created June 27, 2015 03:53
Another Test

hello there


yo

@whipsch
whipsch / testing.md
Last active August 29, 2015 14:23
foo bar baz biff

this

is a test

cool

macro_rules! wrapped_enum {
($(#[$attr:meta])* pub enum $enum_name:ident, $($enum_variant_name:ident($ty:ty),)+) => (
$(#[$attr])*
pub enum $enum_name { $($enum_variant_name($ty)),+ }
$(impl From<$ty> for $enum_name {
fn from (ty: $ty) -> Self {
$enum_name::$enum_variant_name(ty)
}
})+
);
#!/usr/bin/perl
#
#
use warnings;
use strict;
my ($from_dir, $to_dir, $jargs) = @ARGV;
unless ($from_dir && $to_dir) {