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 / 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 / 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"}
---
parser: "babel-eslint"
plugins:
- "react"
ecmaFeatures:
jsx: true
modules: true
spread: true
generators: true
env:
@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/}
@edy
edy / iterator.scss
Last active August 29, 2015 14:21
SCSS nth-child(n) iterator
// frontpage widget colors
$frontpage-widget-color1: #00B5CC;
$frontpage-widget-color2: $green;
$frontpage-widget-color3: #CC181E; // youtube-rot
$frontpage-widget-icon1: "\f086"; // comments
$frontpage-widget-icon2: "\f007"; // user
$frontpage-widget-icon3: "\f16a"; // youtube-play
$colors: (
$colors: (
1: $blog-navigation-color1,
2: $blog-navigation-color2,
3: $blog-navigation-color3,
4: $blog-navigation-color4,
5: $blog-navigation-color5
);
@each $color in $colors {
$nr: nth($color, 1);
$color: nth($color, 2);
@edy
edy / TV-Browser-Benachrichtigungen.md
Last active August 29, 2015 14:07
TV-Browser-Benachrichtigungen (Mitteilungszentrale / Notification Center) unter OS X Mavericks einrichten

  1. terminal-notifier installieren,
  2. TV-Browser-Einstellungen öffnen,
  3. Plugins --> Erinnerer,
  4. "Applikation ausführen" aktivieren,
  5. "Konfigurieren" anklicken,
  6. Applikation: /Applications/terminal-notifier.app/Contents/MacOS/terminal-notifier,
  7. Parameter: -sender tvbrowser.TVBrowser -title "{title}" -message "{channel_name} / {leadingZero(start_hour, "1")}:{leadingZero(start_minute, "1")}Uhr" -subtitle "{episode}"
'use strict';
/**
* frt-nav directive
* should be used within bootstrap navigations to set the 'active' class on current active link (li-element)
* dom should look like this:
* <ul frt-nav>
* <li>
* <a ui-sref="stateName">linkName</a>
* </li>
@edy
edy / Rights.js
Created August 23, 2014 11:48 — forked from tarlepp/Rights.js
'use strict';
var _ = require('lodash');
var actionUtil = require('sails/lib/hooks/blueprints/actionUtil');
/**
* Service function which adds necessary object specified conditions to Project
* model queries. Workflow with this is following:
*
* 1) Fetch project ids where current user is attached to
'use strict';
var actionUtil = require('sails/lib/hooks/blueprints/actionUtil');
/**
* todo
*
* @param {Request} request Request object
* @param {Response} response Response object
* @param {Function} next Callback function