Skip to content

Instantly share code, notes, and snippets.

View adrian-gierakowski's full-sized avatar

Adrian adrian-gierakowski

View GitHub Profile
@iamgreaser
iamgreaser / SDL_jack_audio.c
Created November 16, 2013 03:50
JACK audio driver for SDL 1.2
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2012 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
@quarnster
quarnster / cmake_options_script.py
Created October 24, 2012 05:40
SublimeClang options script taking the compilation commands from CMake. Based on @berenm's pull request https://github.com/quarnster/SublimeClang/pull/135
# Based on @berenm's pull request https://github.com/quarnster/SublimeClang/pull/135
# Create the database with cmake with for example: cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON ..
# or you could have set(CMAKE_EXPORT_COMPILE_COMMANDS ON) in your CMakeLists.txt
# Usage within SublimeClang:
# "sublimeclang_options_script": "python ${home}/code/cmake_options_script.py ${project_path:build}/compile_commands.json",
import re
import os
import os.path
rec {
test1 = builtins.scopedImport { __nixPath = [ { path = test4; prefix="ssh-config-file"; } ] ++ __nixPath; };
test2 = test1 <nixpkgs/pkgs/build-support/fetchgit/private.nix>;
pkgs = import <nixpkgs> {};
test3 = pkgs.callPackage test2 {};
test4 = pkgs.writeText "sshd_config" ''
# empty file, use programs.ssh.knownHosts in configuration.nix not StrictHostKeyChecking no
'';
test5 = test3 {
url = "git@github.com:cleverca22/not-os.git";
@brainrake
brainrake / deploy.hs
Last active July 15, 2020 06:39
nix-shell shebang haskell turtle nixos deploy script
#! /usr/bin/env nix-shell
#! nix-shell --pure -i runghc -p rsync openssh "haskellPackages.ghcWithPackages (pkgs: [ pkgs.turtle ])"
{-# LANGUAGE OverloadedStrings #-}
import Turtle
import Prelude hiding (FilePath)
import qualified Data.Text as T
sshOpts :: [Text]
sshOpts = ["-o", "StrictHostKeyChecking=accept-new"]
#!/bin/bash
set -euo pipefail
# uncomment to debug
# set -x
echo "1️⃣. Does catalina know to create the nix directory?"
if ! grep nix /etc/synthetic.conf > /dev/null 2>&1; then
echo "nix missing from /etc/synthetic.conf. Adding it (will request sudo)"
echo "nix" | sudo tee -a /etc/synthetic.conf > /dev/null

nix-bitcoin Setup

0. Concepts

Motivations

Terminology

  • nix - a language
  • nix - a packaging system
import * as T from "@effect-ts/core/Effect"
import * as S from "@effect-ts/core/Effect/Experimental/Stream"
import * as L from "@effect-ts/core/Effect/Layer"
import * as M from "@effect-ts/core/Effect/Managed"
import * as Q from "@effect-ts/core/Effect/Queue"
import * as SC from "@effect-ts/core/Effect/Schedule"
import { literal, pipe } from "@effect-ts/core/Function"
import { tag } from "@effect-ts/core/Has"
import * as O from "@effect-ts/core/Option"
import type { _A } from "@effect-ts/core/Utils"
let _ = global._ = require("lodash");
let Benchmark = global.Benchmark = require("benchmark");
let Promise = require("bluebird");
let { Map } = require("immutable");
let { produce } = require("immer");
function getItems(count) {
let id = 1;
with import ./. {};
let
extraSources = [];
lib = pkgs.lib;
optionsListVisible =
lib.filter (opt: opt.visible && !opt.internal)
(lib.optionAttrSetToDocList options);