Skip to content

Instantly share code, notes, and snippets.

View mtrsk's full-sized avatar
🛠️
Tinkering

Marcos Benevides mtrsk

🛠️
Tinkering
View GitHub Profile
@mtrsk
mtrsk / Setup.md
Last active March 2, 2024 16:58
Spacemacs config for Proof General

Tutorial

This is a Spacemacs config, I only use it for Coq + Proof General.

Instalation

  • Make sure you have Emacs & Coq installed
  • Install Proof General
cd ~/.emacs.d/private/local
@mtrsk
mtrsk / booklist.md
Created March 29, 2023 11:03 — forked from swlaschin/booklist.md
Some recommended books for improving as a software developer

Some recommended books for improving as a software developer

Most software books are too language specific and go out of date too quickly. What I find has stayed with me are books about bigger concepts, such as systems thinking and complexity, and also so-called "soft skills" such as management and psychology.

User experience

These are all really about developing empathy for other people :)

  • "The Design of Everyday Things" by Donald Norman
@mtrsk
mtrsk / flake.nix
Created May 6, 2021 01:15
Migrate NixOS from channels to flakes
# https://www.tweag.io/blog/2020-07-31-nixos-flakes/
# To switch from channels to flakes execute:
# cd /etc/nixos
# sudo wget -O flake.nix https://gist.githubusercontent.com/misuzu/80af74212ba76d03f6a7a6f2e8ae1620/raw/flake.nix
# sudo sed -i "s/myhost/$(hostname)/g" flake.nix
# sudo git init
# sudo git add . # won't work without this
# nix run nixpkgs.nixFlakes -c sudo nix --experimental-features 'flakes nix-command' build .#nixosConfigurations.$(hostname).config.system.build.toplevel
# sudo ./result/bin/switch-to-configuration switch
{ config, lib, pkgs, ...}:
with lib;
let
cfg = config.services.batteryNotifier;
in {
options = {
services.batteryNotifier = {
enable = mkOption {
{ pkgs ? import <nixpkgs> {}}:
let
jupyterPort = pkgs.config.jupyterPort;
fhs = pkgs.buildFHSUserEnv {
name = "julia-fhs";
targetPkgs = pkgs: with pkgs;
[
git
gitRepo
@mtrsk
mtrsk / analysis.draft.md
Created August 8, 2020 18:59 — forked from MattPD/analysis.draft.md
Program Analysis Resources (WIP draft)
@mtrsk
mtrsk / podman-shell.nix
Created June 25, 2020 12:14 — forked from adisbladis/podman-shell.nix
Use podman within a nix-shell
{ pkgs ? import <nixpkgs> {} }:
let
# To use this shell.nix on NixOS your user needs to be configured as such:
# users.extraUsers.adisbladis = {
# subUidRanges = [{ startUid = 100000; count = 65536; }];
# subGidRanges = [{ startGid = 100000; count = 65536; }];
# };
@mtrsk
mtrsk / shell.nix
Created June 24, 2020 20:14
Multiple Python versions with poetry2nix
{ pkgs ? import <nixpkgs> {} }:
let
makeEnv = python: pkgs.poetry2nix.mkPoetryEnv {
python = python;
pyproject = ./pyproject.toml;
poetrylock = ./poetry.lock;
overrides = [
pkgs.poetry2nix.defaultPoetryOverrides
(self: super: {
@mtrsk
mtrsk / configuration.nix
Created June 21, 2020 20:22 — forked from evanjs/configuration.nix
nixpkgs terraria module - add home config
{ config, lib, pkgs, ... }:
{
services.sshd.enable = true;
services.terraria = {
enable = true;
home = "/srv/terraria";
};
nixpkgs.config.allowUnfree = true;
networking.firewall.allowedTCPPorts = [ 80 ];
@mtrsk
mtrsk / pass.md
Created April 27, 2020 12:14 — forked from abtrout/pass.md
Using password-store with git repository synching

Password-store keeps your passwords (or any other sensitive information) saved in GnuPG encrypted files organized in ~/.password-store. For more information about GPG, consult the GNU Privacy Handbook.

Getting started

To get started, install pass and generate a keypair.

$ brew install pass
$ gpg --gen-key
$ gpg --list-keys