Skip to content

Instantly share code, notes, and snippets.

Avatar

Tobias Marstaller tmarsteel

  • @rebuy https://www.rebuy.de
  • Berlin
View GitHub Profile
@tmarsteel
tmarsteel / deploy.php
Created Sep 17, 2017
PHP Script for pull deployment from git scm
View deploy.php
#!/usr/bin/php5.5-cli
<?php
/**
This script checks out a commit from a git-repository into a directory revision/$hash within the context
directory. Then creates the symbolic links defined in $links within that directory and swiches the symbolic
link $CURRENT_DEPLOYMENT_POINTER_LINK to that new directory.
*/
@tmarsteel
tmarsteel / TransactionQueue.js
Last active Jul 1, 2017
A Promises/A+ based transactional Queue
View TransactionQueue.js
var TransactionQueue = function() {
var items = [],
currentTransactionPromise = null,
queuedDuringTransaction = [],
_self = this;
this.pushItem = function(item) {
if (currentTransactionPromise != null)
{
console.log("Adding item WITHIN transaction: %o", item);
You can’t perform that action at this time.