Skip to content

Instantly share code, notes, and snippets.

View php-coder's full-sized avatar

Slava Semushin php-coder

View GitHub Profile
[INFO] --- maven-compiler-plugin:3.7.0:compile (default-compile) @ mystamps ---
[DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=121233, ConflictMarker.markTime=68698, ConflictMarker.nodeCount=118, ConflictIdSorter.graphTime=42015, ConflictIdSorter.topsortTime=30086, ConflictIdSorter.conflictIdCount=45, ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=780034, ConflictResolver.conflictItemCount=72, DefaultDependencyCollector.collectTime=24621642, DefaultDependencyCollector.transformTime=1069540}
[DEBUG] org.apache.maven.plugins:maven-compiler-plugin:jar:3.7.0:
[DEBUG] org.apache.maven:maven-plugin-api:jar:3.0:compile
[DEBUG] org.apache.maven:maven-model:jar:3.0:compile
[DEBUG] org.sonatype.sisu:sisu-inject-plexus:jar:1.4.2:compile
[DEBUG] org.sonatype.sisu:sisu-inject-bean:jar:1.4.2:compile
[DEBUG] org.sonatype.sisu:sisu-guice:jar:noaop:2.1.7:compile
[DEBUG] org.apache.maven:maven-artifact:jar:3.0:compile
[DEBUG] org.codehaus.plexu
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.StreamSupport;
import org.w3c.dom.Node;
import org.xmlunit.builder.DiffBuilder;
import org.xmlunit.builder.Input;
import org.xmlunit.diff.Diff;
import org.junit.Test;
@php-coder
php-coder / XmlUnitTest.java
Last active December 11, 2017 17:13 — forked from olithin/SolDifferenceEvaluatorChain
XmlUnit_DifferentEvaluator
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import org.xmlunit.builder.DiffBuilder;
import org.xmlunit.builder.Input;
import org.xmlunit.diff.Comparison;
import org.xmlunit.diff.Diff;
import org.xmlunit.diff.Difference;
@php-coder
php-coder / gist:d3020e4d8d00b8c5befe755c46f06f1b
Last active May 16, 2017 22:31
How to do it in Thymeleaf?
Data from the database:
5 BMW Cars
2 Ford Cars
6 Fun NULL
1 Chess Sport
4 Football Sport
3 Rugby Sport
$ docker run --rm --user=1000000000 busybox id
container_linux.go:247: starting container process caused "invalid argument"
/usr/bin/docker-current: Error response from daemon: oci runtime error: container_linux.go:247: starting container process caused "invalid argument".
$ docker run --rm --user=1000 busybox id
uid=1000 gid=0(root)
@php-coder
php-coder / openshift.log
Created April 27, 2017 14:31
vagrant/etcd/openshift panic
I0425 11:11:58.985791 27972 start_master.go:221] Generating master configuration
I0425 11:11:58.986444 27972 create_mastercerts.go:181] Creating all certs with: admin.CreateMasterCertsOptions{CertDir:"openshift.local.config/master", Sign
erName:"openshift-signer@1493118718", ExpireDays:730, SignerExpireDays:1825, APIServerCAFiles:[]string(nil), CABundleFile:"openshift.local.config/master/ca-bu
ndle.crt", Hostnames:[]string{"10.0.2.15", "127.0.0.1", "172.17.0.1", "172.30.0.1", "kubernetes", "kubernetes.default", "kubernetes.default.svc", "kubernetes.
default.svc.cluster.local", "localhost", "openshift", "openshift.default", "openshift.default.svc", "openshift.default.svc.cluster.local"}, APIServerURL:"http
s://10.0.2.15:8443", PublicAPIServerURL:"https://localhost:8443", Overwrite:false, Output:(*util.gLogWriter)(0xc4213f731c)}
I0425 11:11:58.986531 27972 create_signercert.go:99] Creating a signer cert with: admin.CreateSignerCertOptions{CertFile:"openshift.local.config/master/ca.c
rt", KeyFile:"openshif
# Run 2 containters on different consoles:
# $ sudo /opt/rkt/rkt run docker://busybox --private-users --no-overlay --interactive
$ (ps aefjax | head -1; ps aefjax | grep '[/]sh')
PPID PID PGID SID TTY TPGID STAT UID TIME COMMAND
23864 23871 23871 23871 pts/3 23871 Ss+ 439681024 0:00 | \_ /bin/sh
23928 23935 23935 23935 pts/4 23935 Ss+ 1278803968 0:00 | \_ /bin/sh
# Stop containers and run them again
class my::server {
include my::server::user
include my::server::sudo
}
#!/bin/sh
exec puppet apply --modulepath="$PWD/my/modules" --verbose my/manifests/site.pp "$@"
Я согласен, что Perl и его однострочники могут быть удобны, но большинство примеров не очень удачны,
т.к. сделать тоже самое на shell-е может быть куда проще и при этом не нужно знать Perl и
помнить его ключи.
Например:
>cat file.csv | cut -d ';' -f 2 | grep -v afiskon
Легко упрощается до двух комманд: