Skip to content

Instantly share code, notes, and snippets.

#! /bin/bash
user=manolis
backups=/home/manolis/backups
if [[ $EUID > 0 ]]
then echo "Please run as root"
exit
fi
@joepie91
joepie91 / .md
Last active July 14, 2017 08:43
NixOS notes

Some stuff I've had to figure out that wasn't documented...

Proprietary AMD drivers (fglrx)

If you get this error:

/tmp/nix-build-ati-drivers-15.7-4.4.18.drv-0/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:194:22: fatal error: asm/i387.h: No such file or directory
@philjackson
philjackson / attach.el
Last active August 30, 2021 19:13
From an mu4e view, without prompt, save all attachments to a directory and open dired.
;; DEPRECATED - see https://pitch-io.slack.com/archives/CBKNRBRHA/p1630054796006400
(defvar bulk-saved-attachments-dir (expand-file-name "~/Documents/mu4e"))
(defun cleanse-subject (sub)
(replace-regexp-in-string
"[^A-Z0-9]+"
"-"
(downcase sub)))
@paultopia
paultopia / makeslide.py
Last active May 3, 2017 20:41 — forked from aaronwolen/slides.md
Pandoc template to generate reveal.js slideshows. (corrected from original to be compatible with 3.2.0 release of reveal.js); also added a quick python script to generate with less command-line ugliness.
import argparse
# this first bit is to enable multiline help text. apparently this is a known problem with argparse.
# Solution jacked from http://stackoverflow.com/questions/3853722/python-argparse-how-to-insert-newline-in-the-help-text
import textwrap as _textwrap
class MultilineFormatter(argparse.HelpFormatter):
def _fill_text(self, text, width, indent):
text = self._whitespace_matcher.sub(' ', text).strip()
paragraphs = text.split('|n ')
@rehno-lindeque
rehno-lindeque / NixSetup.md
Last active April 2, 2024 20:18
NixOS Setup (Virtualized + Haskell + Gnome3 + XMonad)

Setup NixOS (Virtualized + Haskell + Gnome3 + XMonad)

Before you get started

This is pretty out of date now... you may want to look elsewhere

Newer guides than mine (mine is a bit dated and has a lot of rough edges):

Have you looked at these?