Skip to content

Instantly share code, notes, and snippets.

@nivpgir
nivpgir / .spacemacs
Created November 7, 2017 20:04
niv pagir's .spacemacs
;; -*- mode: emacs-lisp -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
(defun dotspacemacs/layers ()
"Configuration Layers declaration.
You should not put any user code in this function besides modifying the variable
values."
(setq-default
;; Base distribution to use. This is a layer contained in the directory
@nivpgir
nivpgir / *messages*_with_idea_darcula
Created November 7, 2017 20:07
output of spacemcas' *messages* when starting it with the idea-darcula theme enabled.
Loading /home/nivpgir/.emacs.d/core/core-load-paths.el (source)...done
Loading /home/nivpgir/.spacemacs...done
Setting the font...
(Spacemacs) Warning: Cannot find any of the specified fonts (Source Code Pro)! Font settings may not be correct.
PNG warning: Interlace handling should be turned on when using png_read_image
Open the quickhelp.
Contacting host: melpa.org:443
Importing package-keyring.gpg...done
Contacting host: melpa.org:443 [2 times]
Package refresh done
@nivpgir
nivpgir / debug_utils.c
Created November 18, 2018 16:12
useful macros and functions for debugging in C
#ifndef DEBUG_UTILS_C
#define DEBUG_UTILS_C
#ifdef DEBUG
#include <stdio.h>
#define precision_unfactor 10000000ull
/* diff 2 timespec structs easily, used in following macros.
{ config, lib, pkgs, ... }:
let
qca9377_firmware = pkgs.callPackage ./qca9377_firmware.nix { };
in
{
imports =
[ <nixpkgs/nixos/modules/installer/scan/not-detected.nix>
];
module TM where
import Debug.Trace (trace)
import qualified Data.Set as Set
import qualified Data.Stream as Stream
import Data.List (drop, dropWhile, head, iterate)
data TMAnswer = Accept | Reject deriving (Show)