Skip to content

Instantly share code, notes, and snippets.

Avatar

Michael Lingelbach mjlbach

  • Stanford University
  • Menlo Park
  • @mjlbach
View GitHub Profile
@mjlbach
mjlbach / effective_questions.md
Last active Mar 27, 2021
Asking effective questions
View effective_questions.md

Foreword

The open source community depends on the efforts of a small group of volunteers relative to the number of users. In order to make the most of contributors' time, here is some advice for asking “good questions”. This is largely paraphrased from this article by Eric Steven Raymond and Rick Moen, with edits for brevity and tone. If you have the time (and tolerance), I strongly recommend reading that article over this one. Let's start with the procedure.

The procedure

  1. Try to find an answer by searching the archives of the issue-tracker, IRC, matrix-room, discord, forum or mailing list you plan to post to.
  2. Try to find an answer by searching the Web.
  3. Try to find an answer by reading the manual.
  4. Try to find an answer by reading a FAQ.
  5. Try to find an answer by inspection or experimentation.
View minimal_init.lua
local execute = vim.api.nvim_command
local fn = vim.fn
local install_path = "/tmp/site/pack/packer/opt/packer.nvim"
if fn.empty(fn.glob(install_path)) > 0 then
execute("!git clone https://github.com/wbthomason/packer.nvim " .. install_path)
end
execute "packadd packer.nvim"
View launch_language_server.lua
LaunchPyright = function()
settings = {
python = {
analysis = {
autoSearchPaths = true;
useLibraryCodeForTypes = true;
};
};
};
View native comp + pgtk.md
self: super:
let
  libPath = with super; lib.concatStringsSep ":" [
    "${lib.getLib libgccjit}/lib/gcc/${stdenv.targetPlatform.config}/${libgccjit.version}"
    "${lib.getLib stdenv.cc.cc}/lib"
    "${lib.getLib stdenv.glibc}/lib"
  ];
  rev = "b7adb08f960fe6568f702b8f328e65e3833ffc13";
  sha256 = "0p852k5wf8sy9h7x2z6iivf9xnhpy85vly9fn0a1qj2japrhvyr2";
@mjlbach
mjlbach / gccEmacs.md
Last active Mar 31, 2021
Installing gccEmacs (native-comp) with Nix
View gccEmacs.md

Nix

Adding the overlay and configuring cachix

Option 1: Adding the overlay to configuration.nix or home.nix

Add the nix-community overlay to your nixpkgs. You can add the following to your configuration.nix (NixOS, non-user specific) or to your home-manager's home.nix. Note in the case of the latter, this will not be available for installation via nix-env.

{
  nixpkgs.overlays = [