This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env stack | |
-- stack -v runghc --package connection --package http-client --package http-client-tls | |
{-# LANGUAGE OverloadedStrings #-} | |
import Prelude | |
import Control.Concurrent.Async | |
import Network.HTTP.Client | |
import Network.HTTP.Client.TLS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Original: https://alexcabal.com/creating-the-perfect-gpg-keypair/ | |
KEY=xyz | |
DATE=$(date +"%Y%m%d") | |
SCRIPT_BASEDIR=$(dirname "$0") | |
cd "${SCRIPT_BASEDIR}" | |
echo "This script is not for use in automation"; echo "Use it step by step"; exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; dvc-gnus.el --- dvc integration to gnus | |
;; Copyright (C) 2003-2009 by all contributors | |
;; Author: Matthieu Moy <Matthieu.Moy@imag.fr> | |
;; Contributions from: | |
;; Stefan Reichoer <stefan@xsteve.at> | |
;; DVC is free software; you can redistribute it and/or modify |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; credit: https://github.com/redguardtoo/emacs.d | |
;; Gnus addon to beautify patch-like emails. This uses a "ft/" prefix for | |
;; everything to avoid clashing with anything upstream. That prefix can be | |
;; savely s,ft/,,'d - if this is to be submitted to the gnus developers. | |
(require 'diff-mode) | |
(add-hook 'gnus-part-display-hook 'gnus-article-treat-patch) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; simple-mode-line.el --- Simplified Mode Line for Emacs 24 | |
;; Author: Daehyub Kim <lateau at gmail.com> | |
;; URL: https://gist.github.com/4511988 | |
;; Version: 0.3 | |
;; Keywords: mode-line, color | |
;;; Commentary: | |
;; This simplified mode line is adjusted to *white* themes. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun my-ido-find-tag () | |
"Find a tag using ido" | |
(interactive) | |
(tags-completion-table) | |
(let (tag-names) | |
(mapatoms (lambda (x) | |
(push (prin1-to-string x t) tag-names)) | |
tags-completion-table) | |
(etags-select-find (ido-completing-read "Tag: " tag-names nil nil | |
(thing-at-point 'word))))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE ForeignFunctionInterface #-} | |
-- Simple example of calling C from Haskell. | |
-- | |
-- $ ghci | |
-- > :load FfiExample.hs | |
-- > c_sin pi | |
-- 1.2246467991473532e-16 | |
-- | |
-- $ ghc --make FfiExample.hs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
##################################################### | |
# Name: Bash CheatSheet for Mac OSX | |
# | |
# A little overlook of the Bash basics | |
# | |
# Usage: | |
# | |
# Author: J. Le Coupanec | |
# Date: 2014/11/04 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun mode-line-fill-right (face reserve) | |
"Return empty space using FACE and leaving RESERVE space on the right." | |
(unless reserve | |
(setq reserve 20)) | |
(when (and window-system (eq 'right (get-scroll-bar-mode))) | |
(setq reserve (- reserve 3))) | |
(propertize " " | |
'display `((space :align-to (- (+ right right-fringe right-margin) ,reserve))) | |
'face face)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(evil-leader/set-key | |
"e" 'flycheck-next-error | |
"w" 'flycheck-previous-error | |
"f" 'projectile-find-file | |
"prt" 'projectile-regenerate-tags | |
"c" 'projectile-compile-project | |
"b" 'projectile-switch-to-buffer | |
"xc" 'save-buffers-kill-terminal |