Skip to content

Instantly share code, notes, and snippets.

View ratopi's full-sized avatar
😻
Fell in love with Erlang

Ralf Th. Pietsch ratopi

😻
Fell in love with Erlang
View GitHub Profile
@ratopi
ratopi / 0.md
Last active January 13, 2017 22:10
Backup with GIT

backup with git

@ratopi
ratopi / rewrite.md
Last active November 2, 2015 18:43

Apache Rewrite Rule based on Hostname

RewriteEngine on

RewriteMap    lowercase "int:tolower"

RewriteCond   "${lowercase:%{HTTP_HOST}}"   "^www\.([^.]+)\.example\.com$"
RewriteRule   "^(.*)"                                        "/home/%1/www$1"

Just for memo ...

Open Sans

<link href='https://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,800,800italic,700italic&subset=latin,latin-ext' rel='stylesheet' type='text/css'>
font-family: 'Open Sans', sans-serif;

Special Elite (Typewriter Style)

@ratopi
ratopi / howto-rpi2.txt
Last active April 27, 2022 01:08
CouchDB on Raspberry PI
From: http://raspberryperl.com/CouchDB/installCouchDB-1.6.1-on-Pi-2-jessie.txt
================================================================================
# Install CouchDB Database on Pi-2 Running Raspbian Jessie
# These instructions are based on those found on this web page:
( http://jeeonthepi.blogspot.com/2015/09/installing-couchdb-161-on-raspberry-pi.html )
==========================================================================================
##########################################################################################
@ratopi
ratopi / include.js
Last active May 18, 2016 13:49
Simple include for JavaScript
var include = (function ()
{
var knownPaths = {};
return (
function ( path )
{
if ( knownPaths[ path ] ) return;
knownPaths[ path ] = true;
@ratopi
ratopi / example.js
Last active July 21, 2016 15:27
Asynchronous JavaScript <-> Console Communication
var factory = function ( process )
{
var currentReceiverFun = [];
var receiverFun = function ( data )
{
if ( currentReceiverFun.length > 0 )
{
var fn = currentReceiverFun.unshift();
fn( data );
@ratopi
ratopi / erlang-couchdb.md
Last active September 9, 2016 19:42
Erlang Views in CouchDB

How to activate Erlang-Views in CouchDB

Configuration

local.ini

[native_query_servers]
erlang = {couch_native_process, start_link, []}

Restart

@ratopi
ratopi / 0.md
Last active January 13, 2017 22:10
CouchDB Replication

couchdb replication

@ratopi
ratopi / command-logger.sh
Created January 20, 2017 14:26
Allowing git fetch, clone, push via ssh
#!/bin/bash
echo "$SSH_ORIGINAL_COMMAND" >> /home/git/ssh.log
[[ $SSH_ORIGINAL_COMMAND =~ git-receive-pack ]] && eval "$SSH_ORIGINAL_COMMAND" && exit 0
[[ $SSH_ORIGINAL_COMMAND =~ git-upload-pack ]] && eval "$SSH_ORIGINAL_COMMAND" && exit 0
[[ $SSH_ORIGINAL_COMMAND =~ git-upload-archive ]] && eval "$SSH_ORIGINAL_COMMAND" && exit 0
echo "NA" >> /home/git/ssh.log