Skip to content

Instantly share code, notes, and snippets.

View apraga's full-sized avatar

Alexis Praga apraga

View GitHub Profile
@grahamperrin
grahamperrin / freebsd-from-source.md
Last active August 14, 2024 02:38
Updating FreeBSD -CURRENT from source, and more

Notes:

  • the routine is personalised – things such as SDDM and graphics/x11/nvidia-driver-470 in the mix, and the longhand helps me to not make mistakes after being distracted (or falling asleep at the keyboard, or whatever)
  • /bin/csh for all commands below, some no longer require root since I changed ownership of /usr/doc, /usr/obj, /usr/ports, and /usr/src.

Routine

  1. su -
  2. pkg lock -l
  3. pkg unlock emulators/virtualbox-ose-kmod graphics/drm-510-kmod graphics/drm-515-kmod
@Wheest
Wheest / org-movie.el
Created May 8, 2019 17:04
Early version of Emacs org-mode based movie watch list manager
;;; org-movie.el --- An org-mode movie watch list utility
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@dino-
dino- / string-conversions.hs
Last active August 30, 2024 07:52
A handy illustration of converting between String, Text and ByteString in Haskell
#! /usr/bin/env stack
-- stack --resolver lts-18.8 script
{-# LANGUAGE OverloadedStrings #-}
{-
This is a handy illustration of converting between five of the commonly-used
string types in Haskell (String, ByteString, lazy ByteString, Text and lazy
Text).
@pvik
pvik / smartparens-cheatsheet.md
Last active September 12, 2024 10:14
A Cheatsheet for Emacs Smarparens example configuration

An animated cheatsheet for smartparens using the example configuration specified here by the smartparens author. Inspired by this tutorial for paredit.

Traversal

C-M-f sp-forward-sexp
C-M-b sp-backward-sexp
# vim: filetype=muttrc
#
#
# make sure that you are using mutt linked against slang, not ncurses, or
# suffer the consequences of weird color issues. use "mutt -v" to check this.
# custom body highlights -----------------------------------------------
# highlight my name and other personally relevant strings
color body color136 default "(dominique|orban)"
@chrisdone
chrisdone / typing.md
Last active August 18, 2024 09:54
Typing Haskell in Haskell

Typing Haskell in Haskell

MARK P. JONES

Pacific Software Research Center

Department of Computer Science and Engineering

Oregon Graduate Institute of Science and Technology

@wikimatze
wikimatze / gist:9790374
Created March 26, 2014 18:43
Github Two-Factor Authentication Failed For HTTPS

I heard from GitHub Two-Factor Authentication](https://github.com/blog/1614-two-factor-authentication) nearly a couple of days ago when I was reading my RSS feed. I enabled it and couldn' push to any of my repositories anymore. Learn in this blog post how to fix it.

Two-Factor Authentication

"Is a process involving two stages to verify the identity of an entity trying to access services in a computer or in a network". Github solves this authentication with sending an SMS to a device which wants to push to their platform.

Enabling Two-Factor Authentication

#!/bin/sh
echo "Cleaning up..."
rm 00-index.tar.gz
mkdir -p package
echo "Downloading index..."
wget http://hackage.haskell.org/packages/archive/00-index.tar.gz
for splitpk in `tar tf 00-index.tar.gz | cut -d/ -f 2,3`; do
pk=`echo $splitpk | sed 's|/|-|'`
name=$pk.tar.gz