Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View Blackskyliner's full-sized avatar

Christoph Landsdorf Blackskyliner

View GitHub Profile
@Blackskyliner
Blackskyliner / brew-update.php
Last active July 11, 2017 09:22
[OSX][BREW] Handle multiple PHP versions gracefully while 'brew upgrade'
#!/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 October 5, 2016 09:21
Simple AngularJS $q Promise TaskQueue
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 {{
@Blackskyliner
Blackskyliner / check-gitversion.sh
Created December 15, 2015 11:34
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>]