Skip to content

Instantly share code, notes, and snippets.

🛠
Tinkering

Marcos Benevides mtrsk

🛠
Tinkering
Block or report user

Report or block mtrsk

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
View 001_monad_parser.py
## Alexey Kachayev, 2014
## Link to slides:
## http://goo.gl/n4ylC4
## Basic:
## type Parser = String -> Tree
## Composition
## type Parser = String -> (Tree, String)
View how-to-generate-and-use-private-keys-with-openssl-tool.md

How to Generate & Use Private Keys using OpenSSL's Command Line Tool

These commands generate and use private keys in unencrypted binary (not Base64 “PEM”) PKCS#8 format. The PKCS#8 format is used here because it is the most interoperable format when dealing with software that isn't based on OpenSSL.

OpenSSL has a variety of commands that can be used to operate on private key files, some of which are specific to RSA (e.g. openssl rsa and openssl genrsa) or which have other limitations. Here we always use

@mtrsk
mtrsk / overlays.nix
Last active Sep 3, 2019
Using Nix overlays for local Python Packages. Mostly stolen ideas from https://gist.github.com/Denommus/0a72f25ce858d6a68a0f53bd825c418d
View overlays.nix
self: super:
let
py-override = {
packageOverrides = python-self: python-super: {
altgraph = python-super.buildPythonPackage rec {
pname = "altgraph";
version = "0.16.1";
doCheck = false;
@mtrsk
mtrsk / shell.nix
Created Jul 19, 2019 — forked from aabs/shell.nix
A simple nix-shell script to establish an environment for Phoenix, Elixir and PostgreSQL development
View shell.nix
{ nixpkgs ? import <nixpkgs> {}
, version ? "0.1"
, proxy ? "http://10.183.23.58:3128"
}:
with nixpkgs;
let
elixir = beam.packages.erlangR21.elixir_1_7;
nodejs = nodejs-10_x;
@mtrsk
mtrsk / shell.nix
Created Jul 19, 2019 — forked from aabs/shell.nix
nix shell for python dev
View shell.nix
{ pkgs ? import <nixpkgs> {} }:
with pkgs;
let
inherit (lib) optional optionals;
proxy = "<your proxy if you need one>";
in
mkShell {
View nix-development-template-file.org

Standard project structure

This is a project structure I’ve found useful. Looking for any thoughts/comments/feedback. Roughly, I found a tension between the style nixpkgs expects and the style conducive to development, so I extracted the common portion into a derivation.nix which is used by the remaining .nix files. This setup allows me to use nix build, nix-shell, overlays, Hydra, alternate packaging schemes, cross-compiling, etc.

@mtrsk
mtrsk / default.nix
Last active Aug 16, 2019
Home-Manager "auto" update. This helps me get a newer version than stable everytime I do a `nixos-rebuild switch`.
View default.nix
self: super:
let
json = builtins.fromJSON (builtins.readFile ./version.json);
date = json.date;
home-manager-src = super.fetchFromGitHub {
owner = "rycee";
repo = "home-manager";
inherit (json) rev sha256;
};
@mtrsk
mtrsk / ipfs-service.nix
Created Apr 23, 2019
Nixos Systemd Daemons
View ipfs-service.nix
{lib, options, pkgs, config, ...}:
{
systemd.services.ipfs-daemon = {
description = "IPFS Daemon";
wantedBy = [ "default.target" ];
after = [ "network.target" ];
serviceConfig = {
Type = "forking";
User = "usul";
@mtrsk
mtrsk / Setup.md
Last active Sep 20, 2019
Spacemacs config for Proof General
View Setup.md

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
You can’t perform that action at this time.