Skip to content

Instantly share code, notes, and snippets.

View olegchir's full-sized avatar

Oleg Chirukhin olegchir

View GitHub Profile
<?php
class BaseClass {
public function baseMethod () {
echo (implode (' ', $this -> childMethod ()) . PHP_EOL);
}
}
class ChildClass extends BaseClass {
protected function childMethod () {
return array ('What', 'The', 'Actual', 'Fuck!');
case class Request(requestType: String, id: Int, recipients: List[String], body: String, ext: Option[List[String]]){
def toXML =
<requests>
<request type={requestType} id={id}>
{recipientsXML}
<body>{body}</body>
{extXML}
</request>
</requests>
@olegchir
olegchir / bookmark.js
Created May 7, 2019 20:05 — forked from oilvier/bookmark.js
Javascript to add a bookmark - Cross Browser
/**
*
* Add to bookmark
* Several tests are necessary in order for this "simple" action to work in most of the browsers
*
*/
// First, we define the element where the "Add to bookmark" action will trigger
var triggerBookmark = $(".js-bookmark"); // It must be an `a` tag
@olegchir
olegchir / bookmark.js
Created May 7, 2019 20:04 — forked from oilvier/bookmark.js
Javascript to add a bookmark - Cross Browser
/**
*
* Add to bookmark
* Several tests are necessary in order for this "simple" action to work in most of the browsers
*
*/
// First, we define the element where the "Add to bookmark" action will trigger
var triggerBookmark = $(".js-bookmark"); // It must be an `a` tag
<?xml version="1.0"?>
<project xmlns="http://maven.apache.org/POM/4.0.0">
<modelVersion>4.0.0</modelVersion>
<!-- remove this if you don't have a parent pom -->
<parent>
<groupId>my.company</groupId>
<artifactId>my.company</artifactId>
<version>1.2.3</version>
<relativePath>../pom.xml</relativePath>
<build>
<plugins>
<!-- plug in for creation of patched JAR file -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.1</version>
<executions>
<execution>
<phase>package</phase>
<dependencies>
<dependency>
<groupId>com.sun.xml.wss</groupId>
<artifactId>xws-security</artifactId>
<version>3.0</version>
<exclusions>
<exclusion>
<artifactId>xmldsig</artifactId>
<groupId>javax.xml.crypto</groupId>
</exclusion>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.sun.xml.wss</groupId>
<artifactId>xws-security</artifactId>
<version>3.0-java8-fix</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
(1) [6.084s][debug][gc,periodic ] Checking for periodic GC.
[6.086s][info ][gc ] GC(13) Pause Young (Concurrent Start) (G1 Periodic Collection) 37M->36M(78M) 1.786ms
(2) [9.087s][debug][gc,periodic ] Checking for periodic GC.
[9.088s][info ][gc ] GC(15) Pause Young (Prepare Mixed) (G1 Periodic Collection) 9M->9M(32M) 0.722ms
(3) [12.089s][debug][gc,periodic ] Checking for periodic GC.
[12.091s][info ][gc ] GC(16) Pause Young (Mixed) (G1 Periodic Collection) 9M->5M(32M) 1.776ms
(4) [15.092s][debug][gc,periodic ] Checking for periodic GC.
[15.097s][info ][gc ] GC(17) Pause Young (Mixed) (G1 Periodic Collection) 5M->1M(32M) 4.142ms
(5) [18.098s][debug][gc,periodic ] Checking for periodic GC.
[18.100s][info ][gc ] GC(18) Pause Young (Concurrent Start) (G1 Periodic Collection) 1M->1M(32M) 1.685ms
8801.974: [G1Ergonomics (Concurrent Cycles) request concurrent cycle initiation, reason: occupancy higher than threshold, occupancy: 12582912000 bytes, allocation request: 0 bytes, threshold: 12562779330 bytes (45.00 %), source: end of GC]
8804.670: [G1Ergonomics (Concurrent Cycles) initiate concurrent cycle, reason: concurrent cycle initiation requested]
8805.612: [GC concurrent-mark-start]
8820.483: [GC concurrent-mark-end, 14.8711620 secs]