Skip to content

Instantly share code, notes, and snippets.

Christoph Landsdorf Blackskyliner

Block or report user

Report or block Blackskyliner

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Blackskyliner
Blackskyliner / brew-update.php
Last active Jul 11, 2017
[OSX][BREW] Handle multiple PHP versions gracefully while 'brew upgrade'
View brew-update.php
#!/usr/bin/php
<?php
$packageArray = [];
// Save actual php version for restore at the end
$prevPHPVersion = exec('php -r' . escapeshellarg('echo PHP_VERSION;'));
list($major, $minor, $patch) = explode('.', $prevPHPVersion);
$prevPHPVersion = "$major$minor";
// Update brew repository
@Blackskyliner
Blackskyliner / TaskQueue.js
Last active Oct 5, 2016
Simple AngularJS $q Promise TaskQueue
View TaskQueue.js
const TaskQueue = [
'$q',
/**
* The TaskQueue will allow to limit parallel requests of Angular $q Promises (Tasks).
* While starting the creation and processing of the Promises it will adhere to the configured maxConcurrentTasks.
* If a Taks returns another Promise it will also be chained within this restricted environment.
*
* @param {$q} $q Anuglars $q Service to control Promise creation.
*
* @return {{
View check-gitversion.sh
#!/bin/bash
function printHelp {
echo """CheckGitHash Agent
Dieses Tool prüft, ob die Version eines lokalen Git-Rrepositories, welches in <dir> liegt, mit der Version von <repoUri> übereinstimmt.
Dabei wird die lokale Version mit dem <branch> von <repoUri> verglichen.
Usage: $0 <dir> <repoUri> [<branch>]
You can’t perform that action at this time.