Skip to content

Instantly share code, notes, and snippets.

👊
omae wa mou shindeiru

Austin Seipp thoughtpolice

👊
omae wa mou shindeiru
Block or report user

Report or block thoughtpolice

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@thoughtpolice
thoughtpolice / symbiflow.nix
Created Sep 26, 2019
SymbiFlow for Nixpkgs
View symbiflow.nix
with import <nixpkgs> {};
let
nextpnr-gui = pkgs.nextpnr; # gui by default on upstream
nextpnr-nogui = pkgs.nextpnr.override { enableGui = false; };
common-pkgs = with pkgs; [
symbiyosys yosys verilog verilator
icestorm trellis
z3 yices boolector
@thoughtpolice
thoughtpolice / fastly-cache-debug.sh
Created Aug 1, 2019
Grab Fastly debugging info from cache.nixos.org
View fastly-cache-debug.sh
#!/usr/bin/env bash
[ -z "$1" ] && echo "ERROR: must provide arg" && exit 1
CACHE_URL=${CACHE_URL:-"https://cache.nixos.org"}
curl -v \
-HFastly-Debug:1 \
-o /dev/null 2>&1 \
"$CACHE_URL/$1" \
@thoughtpolice
thoughtpolice / foundationdb-beta1-getting-started.template
Created Feb 7, 2019
Ancient CloudFormation FoundationDB template, discovered by completing an ancient trial
View foundationdb-beta1-getting-started.template
{
"AWSTemplateFormatVersion" : "2010-09-09",
"Description" : "FoundationDB CloudFormation Test. **WARNING** This template creates one or more Amazon EC2 instances. You will be billed for the AWS resources used if you create a stack from this template.",
"Parameters" : {
"InstanceType" : {
"Description" : "EC2 instance type",
"Type" : "String",
"Default" : "m1.large",
View decoder.sail
/* -------------------------------------------------------------------------- */
/* -- LUI encoding ---------------------------------------------------------- */
union clause ast = LUI : Utype
mapping clause encdec_base = LUI(imm, rd) <-> imm @ rd @ 0b0110111
function clause print_insn LUI(imm, rd) = "lui " ^ rd ^ ", " ^ bits_str(imm)
/* -------------------------------------------------------------------------- */
/* -- AUIPC encoding -------------------------------------------------------- */
@thoughtpolice
thoughtpolice / default.nix
Created Jan 15, 2019
nix-shell file for picorv32 development.
View default.nix
# nix.shell: PicoRV32 Development Environment
#
# This file allows you to use the Nix Package Manager (https://nixos.org/nix)
# in order to download, install, and prepare a working environment for doing
# PicoRV32/PicoSoC development on _any_ existing Linux distribution, provided
# the Nix package manager is installed.
#
# Current included tools:
#
# - Synthesis: Recent Yosys and SymbiYosys
@thoughtpolice
thoughtpolice / llvm-static-musl.nix
Created Jan 11, 2019
Static C++17 binaries with Clang, Musl, and libc++, using Nix
View llvm-static-musl.nix
{ useMusl ? false
}:
let
nixpkgs = import (builtins.fetchTarball {
url = "https://github.com/NixOS/nixpkgs/archive/004cb5a694e39bd91b27b0adddc127daf2cb76cb.tar.gz";
sha256 = "0v5pfrisz0xspd3h54vx005fijmhrxwh0la7zmdk97hqm01x3mz4";
}) {};
pkgs = if useMusl then nixpkgs.pkgsMusl else nixpkgs;
@thoughtpolice
thoughtpolice / keybase.md
Created Sep 6, 2018
Keybase verification
View keybase.md

Keybase proof

I hereby claim:

  • I am thoughtpolice on github.
  • I am aseipp (https://keybase.io/aseipp) on keybase.
  • I have a public key ASDlfufSsLCTJwDnY7DS0FG0jNbxCw0gtfJ73wSFVHp-gAo

To claim this, I am signing this object:

View example.nix
with import <nixpkgs> {};
let
source = lib.writeFile "something.cc" ''
#include <stdio.h>
int main(void) { printf("%d\n", 42); return 0; }
'';
in
stdenv.mkDerivation {
View example.nix
let
mkPlug = p: p.override { postgresql = config.services.postgresql.package; };
in {
enable = true;
package = pgsql;
dataDir = "/data/pgsql";
extraConfig = "shared_preload_libraries = 'timescaledb'";
extraPlugins = with pkgs; map mkPlug
[ postgis
View gist:af539fc16f6d19aee8384d5aef57f565
a@link> nix run -f '<nixpkgs>' hello ~
[1 copied (0.2 MiB), 0.0 MiB DL]
[a@link:~]$ which hello
which: no hello in (/home/a/bin:/run/wrappers/bin:/etc/profiles/per-user/a/bin:/home/a/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin)
[a@link:~]$ exit
[1] a@link> nix run -f '<nixpkgs>' hello -c hello ~
Hello, world!
a@link>
You can’t perform that action at this time.