Skip to content

Instantly share code, notes, and snippets.

View j0xaf's full-sized avatar

Jörn Gersdorf j0xaf

  • Düsseldorf, Germany
  • X @j0xaf
View GitHub Profile
@jhartikainen
jhartikainen / DynLoad.hs
Created August 20, 2011 11:31
Module for loading modules dynamically in Haskell
{-# LANGUAGE ScopedTypeVariables #-}
module DynLoad (
loadSourceGhc,
execFnGhc
) where
import Control.Exception (throw)
import GHC hiding (loadModule)
import GHC.Paths (libdir)
import HscTypes (SourceError, srcErrorMessages)
@albertoaflores
albertoaflores / .mavenrc
Created July 3, 2012 12:27
Sample .mavenrc file for SSL connections
MAVEN_OPTS="-Djavax.net.ssl.keyStore=<YOU KEYSTORE FILE> \
-Djavax.net.ssl.keyStorePassword=<YOUR KEYSTORE PASSWORD> \
-Djavax.net.ssl.keyStoreType=JKS \
-Djavax.net.ssl.trustStore=<YOUR TRUSTSTORE FILE> \
-Djavax.net.ssl.trustStorePassword=<YOUR TRUSTSTORE PASSWORD> \
-Djavax.net.ssl.trustStoreType=JKS"
@sebfisch
sebfisch / gist:3757918
Created September 20, 2012 19:43
Comparing Snap's and Yesod's Template Languages Heist and Hamlet

Comparing Snap's and Yesod's Template Languages Heist and Hamlet - and HSP

Currently, Snap and Yesod are the two most active web frameworks for Haskell. In this document, I compare the template languages used by those frameworks for generating HTML.

Both template languages let programmers write markup directly in a markup language rather than generating it from within Haskell. Compared with static HMTL, template languages support substitution to dynamically determine parts of the content of the generated page.

[Heist] and [Hamlet] support different constructs to generate content dynamically. They also differ regarding their syntax for static content.

@vaughnd
vaughnd / gist:3759951
Created September 21, 2012 06:02
Bash script to run more than one process in parallel and kill all when exiting the script (via ctrl-c or kill)
#!/bin/bash
# kill all subshells and processes on exit
trap "kill 0" SIGINT
# start commands in subshells so all their spawn DIE when we exit
( process1 ) &
( process2 ) &
wait
@calmyournerves
calmyournerves / building_git-annex_on_osx_mavericks.sh
Last active August 13, 2023 20:51
Building git-annex on OS X 10.9 Mavericks
# make sure the following is installed:
# - Xcode Command Line Tools (xcode-select --install)
# - OpenSSL from homebrew (brew install openssl && brew link openssl --force)
# dependencies and preparations
brew update
brew install git ossp-uuid md5sha1sum coreutils pcre gnutls libidn gsasl pkg-config libxml2
brew link libxml2 --force
brew tap darinmorrison/haskell
brew install darinmorrison/haskell/cabal-install
@brson
brson / gist:9dec4195a88066fa42e6
Last active May 7, 2024 02:34
A Rust Syntax Guide

A Guide to Rust Syntax

A very brief guide to Rust syntax. It assumes you are already familiar with programming concepts.

This was written in 2014. It is not a good reference for Rust today, though the content is still correct.

cheats.rs looks like a good alternative.

Assert macro

@vt0r
vt0r / GnuPG-2.2.md
Last active February 13, 2024 09:03 — forked from mattrude/GnuPG-2.1.md
Build/install instructions for GnuPG 2.2.x on Ubuntu and similar distros (formerly for 2.1.x)

GnuPG 2.2.x Build Instructions

Below are my build instructions for GnuPG 2.2.10, released on August 30th, 2018. These instructions are built for a headless Ubuntu 18.04 LTS server (and have also been tested on Ubuntu 14.04/16.04).

If you prefer, you may use the below install script to install GnuPG 2.2.x by running the following commands:

curl -OL "https://gist.githubusercontent.com/vt0r/a2f8c0bcb1400131ff51/raw/e0d2011d7b89bfe5b83c3f29f21949fb21354dd9/install-gnupg22.sh" && sudo -H bash ./install-gnupg22.sh

Install the needed dependencies

@iandyh
iandyh / gist:5a1b1de9a46c6fa385f1
Last active February 19, 2020 16:33
Install Git with OpenSSL on Ubuntu
# install git with openssl
ENV GIT_VERSION 1.9.1
ENV PLATFORM 1ubuntu0.1
ENV GIT ${GIT_VERSION}-${PLATFORM}
RUN apt-get install -y build-essential dpkg-dev
RUN mkdir -p git-openssl
WORKDIR /tmp/git-openssl
RUN apt-get source git=1:${GIT}
RUN apt-get -y build-dep git
RUN dpkg-source -x git_${GIT}.dsc
@fastnsilver
fastnsilver / SpringIntegrationManagementMetrics.java
Last active October 30, 2020 21:09
Spring Integration Management metrics exposed as Spring Boot Actuator PublicMetrics
public class SpringIntegrationManagementMetrics implements PublicMetrics, ApplicationContextAware {
private ApplicationContext applicationContext;
@Override
public Collection<Metric<?>> metrics() {
Collection<Metric<?>> result = new LinkedHashSet<Metric<?>>();
// Collect Spring Integration metrics; if available
// keys in each map are the bean names
@pescobar
pescobar / build-git.sh
Created October 5, 2015 07:14
compile git with openssl instead of gnutls
#!/usr/bin/env bash
# Clear out all previous attempts
rm -rf "/tmp/source-git/"
# Get the dependencies for git, then get openssl
sudo apt-get install build-essential fakeroot dpkg-dev -y
sudo apt-get build-dep git -y
sudo apt-get install libcurl4-openssl-dev -y
mkdir -p "/tmp/source-git/"