Skip to content

Instantly share code, notes, and snippets.

View edy's full-sized avatar

Eduard Baun edy

  • Paderborn, Germany
View GitHub Profile
@edy
edy / docker-compose.yml
Created March 15, 2017 22:02
GitLab CE Docker Image Configuration (with registry)
web:
image: 'gitlab/gitlab-ce:8.17.3-ce.0'
restart: always
hostname: 'git.example.com'
environment:
GITLAB_OMNIBUS_CONFIG: |
external_url 'https://git.example.com'
nginx['listen_port'] = 80
nginx['listen_https'] = false
nginx['proxy_set_headers'] = {"X-Forwarded-Proto" => "https","X-Forwarded-Ssl" => "on"}
@edy
edy / upload.sh
Created August 19, 2019 10:22
Upload script for https://transfer.sh
#!/bin/sh
if [ $# -eq 0 ];
then echo -e "No arguments specified. Usage:\necho upload /tmp/test.md\ncat /tmp/test.md | upload test.md";
return 1;
fi
tmpfile=$( mktemp -t uploadXXX );
if tty -s;
@edy
edy / angular-directive-navmenu.js
Last active May 30, 2018 04:16
AngularJS directive to mark navigation menu items as active
'use strict';
// <ul nav-menu="active">
// <li><a href="/one">Page One</a></li>
// <li><a href="/two">Page Two</a></li>
// <li><a href="/three">Page Three</a></li>
// </ul>
app.directive('navMenu', function($location) {
return function(scope, element, attrs) {
---
parser: "babel-eslint"
plugins:
- "react"
ecmaFeatures:
jsx: true
modules: true
spread: true
generators: true
env:
#!/bin/bash
# http://blog.streak.com/2013/01/how-to-build-safari-extension.html
XAR=path/to/xar/bin
BUILD_DIR=path/to/dir/with/cert/files
EXTENSION=your extension name
$XAR -czf $EXTENSION.safariextz --distribution $EXTENSION.safariextension
$XAR --sign -f $EXTENSION.safariextz --digestinfo-to-sign digest.dat --sig-size `cat $BUILD_DIR/size.txt` --cert-loc $BUILD_DIR/cert.der --cert-loc $BUILD_DIR/cert01 --cert-loc $BUILD_DIR/cert02
openssl rsautl -sign -inkey $BUILD_DIR/key.pem -in digest.dat -out sig.dat
$XAR --inject-sig sig.dat -f $EXTENSION.safariextz
@edy
edy / JSONP.js
Last active December 19, 2015 14:59 — forked from icodeforlove/JSONP.js
/**
* simple JSONP support
*
* JSONP.get('https://api.github.com/gists/5973376', function (data) { console.log(data); });
* JSONP.get('https://api.github.com/gists/5973376', {}, function (data) { console.log(data); });
*
* gist: https://gist.github.com/edy/5973376
*/
var JSONP = (function (document) {
var requests = 0,
#!/bin/sh
# This program has two feature.
#
# 1. Create a disk image on RAM.
# 2. Mount that disk image.
#
# Usage:
# $0 <dir> <size>
#
@edy
edy / post-receive.sh
Last active October 9, 2015 08:07
post receive hook for git
#!/bin/bash
postreceivescript=$(git config hooks.postreceivescript)
redmineid=$(git config hooks.redmineid)
url=$(git config hooks.url)
while read msg; do
echo "Sending post-receive email"
echo "$msg" | /usr/share/doc/git-core/contrib/hooks/post-receive-email
@edy
edy / ep.json
Created March 14, 2012 16:18
Ein DDI-Plugin für Etherpad Lite
{
"parts": [
{
"name": "ddi-plugin",
"hooks": {
"expressCreateServer": "ep_ddi/plugin:expressServer"
}
}
]
}
@edy
edy / ntfs-3g
Created July 29, 2015 20:56
fix for "autofs: ntfs-3g: Unknown option '-s'"
#!/bin/bash
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=787779
exec /bin/ntfs-3g.orig ${*/-s/}