This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
include 'config.core.php'; | |
include MODX_CORE_PATH . 'model/modx/modx.class.php'; | |
$modx = new modX(); | |
$modx->initialize('web'); | |
$modx->setLogTarget(XPDO_CLI_MODE ? 'ECHO' : 'HTML'); | |
$modx->setLogLevel(xPDO::LOG_LEVEL_INFO); | |
$tstart = $modx->getMicroTime(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Claas Heuer, November 2015 | |
# | |
# Setup Powerline on Debian and Centos for BASH, VIM and TMUX | |
# source: https://fedoramagazine.org/add-power-terminal-powerline/ | |
# install on debian | |
sudo apt-get install python-pip | |
sudo apt-get install powerline |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# delete local tag '12345' | |
git tag -d 12345 | |
# delete remote tag '12345' (eg, GitHub version too) | |
git push origin :refs/tags/12345 | |
# alternative approach | |
git push --delete origin tagName | |
git tag -d tagName |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'uri' | |
require 'net/http' | |
require 'json' | |
class UpdatesIssuesNotifierListener < Redmine::Hook::Listener | |
CALLBACK_URL = 'https://localhost:3333'.freeze | |
def controller_issues_edit_after_save(context) | |
data = { | |
'issueid' => context[:issue].id, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Various configurations of Monolog and Whoops | |
* using a Pimple Container as service locator | |
* | |
* Monolog: https://github.com/Seldaek/monolog | |
* Pimple: https://github.com/fabpot/Pimple | |
* Whoops: https://github.com/filp/whoops | |
* Swift Mailer: https://github.com/swiftmailer/swiftmailer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String.prototype.getInitials = function(glue){ | |
if (typeof glue == "undefined") { | |
var glue = true; | |
} | |
var initials = this.replace(/[^a-zA-Z- ]/g, "").match(/\b\w/g); | |
if (glue) { | |
return initials.join(''); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# import config. | |
# You can change the default config with `make cnf="config_special.env" build` | |
cnf ?= config.env | |
include $(cnf) | |
export $(shell sed 's/=.*//' $(cnf)) | |
# import deploy config | |
# You can change the default deploy config with `make cnf="deploy_special.env" release` | |
dpl ?= deploy.env | |
include $(dpl) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div class="row"> | |
<div class="col-md-6 col-sm-6 col-xs-12"> | |
<div class="info-box"> | |
<span class="info-box-icon bg-green"><i class="fa fa-users"/></span> | |
<div class="info-box-content"> | |
<span class="info-box-text">Active users</span> | |
<span class="info-box-number">{{ usersCount || 0 }}</span> | |
</div> | |
</div> |