#Litus installation
(https://github.com/LitusProject/Litus)
- Install Ubuntu server 12.04
- User
litus
- Select
- Base system
- LAMP server
- OpenSSH server
#Litus installation
(https://github.com/LitusProject/Litus)
litus
#!/bin/bash -e | |
data="$(curl -A "delay-notification/1.0 (irail@vbgn.be)" https://api.irail.be/connections/\?from\=$IRAIL_FROM\&to\=$IRAIL_TO\&format\=json\&time=$IRAIL_TIME)" | |
connection="$(echo "$data" | jq '[.connection[] | select(has("vias") == false and .departure.left == "0")][0]')" # First one that goes straight through and has not left | |
delay="$[ $(echo "$connection" | jq '.departure.delay' -r) / 60 ]" | |
train_id="$(echo "$connection" | jq '.departure.vehicle' -r)" | |
departure_time_unix="$(echo "$connection" | jq '(.departure.delay|tonumber) + (.departure.time|tonumber)' -r)" | |
departure_time="$(date --date=@$departure_time_unix +%R)" | |
canceled="$(echo "$connection" | jq '.departure.canceled' -r)" |
docker-compose up
docker ps
)dig @127.0.0.1 -p <dnsmasq port> A consul.service.consul
(This works and resolves to 127.0.0.1)dig @127.0.0.1 -p <dnsmasq port> DS consul.service.consul
(This does not work and times out in dig)#!/bin/bash | |
# Call as docker-intercept <container-name> <port-inside-container> <port-on-host> | |
set -e | |
container="$1" | |
container_port="$2" | |
host_port="$3" | |
network_id="$(docker inspect "$container" | jq '.[0].NetworkSettings.Networks | to_entries | .[0].value.NetworkID' -r)" | |
container_ip="$(docker inspect "$container" | jq '.[0].NetworkSettings.Networks | to_entries | .[0].value.IPAddress' -r)" |
package com.activiti.extension.bean.eu.xenit.xyz.repo.workflow.activiti; | |
import net.sf.acegisecurity.providers.dao.User; | |
import org.activiti.engine.delegate.DelegateExecution; | |
import org.activiti.engine.delegate.DelegateTask; | |
import org.activiti.engine.delegate.ExecutionListener; | |
import org.activiti.engine.delegate.JavaDelegate; | |
import org.activiti.engine.delegate.TaskListener; | |
import org.activiti.engine.delegate.VariableScope; | |
import org.alfresco.repo.security.authentication.AuthenticationUtil; |
plugins { | |
id 'eu.xenit.docker-alfresco' version '4.0.2' | |
} | |
repositories { | |
mavenCentral() | |
jcenter() | |
maven { | |
url "https://artifacts.alfresco.com/nexus/content/groups/public/" | |
} |
<?php | |
namespace vierbergenlars\Norch\QueryParser; | |
class Lexer | |
{ | |
/** | |
* This class should not be instanciated | |
*/ |
git ls-files | grep -v .jpg$ | grep -v .min.js$ | grep -v composer | grep -v views/errors | grep -v application/config | xargs -n1 git blame -w | ruby -n -e '$_ =~ /^.*\(([a-zA-Z ]+)\d{4}/; puts $1' | sed 's/ //g' | sort -f | uniq -c | sort -n | |
git log --no-merges --shortstat --use-mailmap --format='%aE' -- application/cache application/config application/controllers application/core application/helpers application/hooks application/index.html application/language application/libraries application/logs application/migrations application/models application/resources application/third_party application/views |sed 's/\(.*\)@.*/\1/' | grep -v "^$" | awk 'BEGIN { line=""; } !/^ / { if (line=="" || !match(line, $0)) {line = $0 "," line }} /^ / { print line " # " $0; line=""}' | sort | sed -E 's/# //;s/ files? changed,//;s/([0-9]+) ([0-9]+ deletion)/\1 0 insertions\(+\), \2/;s/\(\+\)$/\(\+\), 0 deletions\(-\)/;s/insertions?\(\+\), //;s/ deletions?\(-\)//' | awk 'BEGIN {name=""; files=0; insertions=0; deletions=0;} |
# Run these commands and the repo will be back in sync | |
# Note: tags are lost, because the commits are rewritten | |
sudo curl http://cs.sensiolabs.org/get/php-cs-fixer.phar -o /usr/local/bin/php-cs-fixer | |
sudo chmod a+x /usr/local/bin/php-cs-fixer | |
git filter-branch --tree-filter "php-cs-fixer fix .>/dev/null" --all |
0 0 * * 1 bash -c 'update_check=$($HOME/bin/wp core check-update --path=$HOME/apps/wordpress-main); if [[ ! "$update_check" =~ ^Success: ]]; then echo -e "Please update wordpress to the latest version.\n$update_check"| mail $USER -s "Wordpress update"; fi' |