Skip to content

Instantly share code, notes, and snippets.

@mppf
mppf / gist:bc354d8c6277e999c27bbbca0c2a034f
Last active December 21, 2022 03:55
setting up git for access token on Ubuntu 20.04
# Install gpg helper tools
sudo apt-get install gnupg-agent pinentry-curses
# Fix permission on the included git-credential-netrc
sudo chmod a+x /usr/share/doc/git/contrib/credential/netrc/git-credential-netrc
# create a GitHub access token for this
# Go to Settings -> Developer Settings -> Personal access tokens -> Generate new token
# We will save the token in an encrypted .netrc file below
# create a gpg key (if you do not have one already on the machine)
@mppf
mppf / libevent-timing-demo.c
Created September 29, 2021 17:17
libevent timeout across multiple event_add
/*
Program to demonstrate managing total timeout across many
event_add calls.
It accepts input on stdin for 2 seconds and demonstrates running
for 2 seconds whether there is input or not.
*/
#include <errno.h>
@mppf
mppf / chapel.rb
Created February 2, 2022 14:20
draft homebrew formula for Python 3.10 and Chapel 1.25.1
class Chapel < Formula
desc "Programming language for productive parallel computing at scale"
homepage "https://chapel-lang.org/"
url "https://github.com/chapel-lang/chapel/releases/download/1.25.1/chapel-1.25.1.tar.gz"
sha256 "0c13d7da5892d0b6642267af605d808eb7dd5d4970766f262f38b94fa2405113"
license "Apache-2.0"
revision 1
bottle do
sha256 arm64_monterey: "e11d484b8dbeb19649b46ebadb1ff063e79a3fa7c3e1befc258c6fd28a4712a2"