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
CREATE USER MONITORING IDENTIFIED BY password; | |
GRANT CREATE SESSION TO MONITORING; | |
GRANT SELECT any dictionary MONITORING; | |
GRANT SELECT ON V_$SYSSTAT TO MONITORING; | |
GRANT SELECT ON V_$INSTANCE TO MONITORING; | |
GRANT SELECT ON V_$LOG TO MONITORING; | |
GRANT SELECT ON SYS.DBA_DATA_FILES TO MONITORING; | |
GRANT SELECT ON SYS.DBA_FREE_SPACE TO MONITORING; |
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 java.time.Clock; | |
import java.time.LocalTime; | |
public class TimeMachine { | |
private LocalTime from = LocalTime.MIDNIGHT; | |
private LocalTime until = LocalTime.of(6, 0); | |
private Clock clock = Clock.systemDefaultZone(); |
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 com.vaadin.annotations.VaadinServletConfiguration; | |
import com.vaadin.cdi.server.VaadinCDIServlet; | |
import javax.servlet.ServletConfig; | |
import javax.servlet.ServletException; | |
import javax.servlet.annotation.WebServlet; | |
/** | |
* PM custom Vaadin servlet. | |
* <p>Vaading config <code>productionMode</code> is set by default to <code>true</code>. |
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
def oracle(Object o) { return 'object' } | |
def oracle(String o) { return 'string' } | |
Object x = 1 | |
Object y = 'foo' | |
assert 'object' == oracle(x) | |
assert 'string' == oracle(y) |
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
######################################################## | |
# | |
# Check certificates inside a java keystore | |
# | |
######################################################## | |
[CmdletBinding()] | |
Param( | |
[Parameter(Mandatory=$True)] | |
[string]$keystore, |
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
"""commands for working with feature branches | |
feature_branches is a Mercurial extension used to with features branches.""" | |
from mercurial import util, commands, merge | |
def close_feature(ui, repo, node, **opts): | |
"""Close a feature branch (e.g. fb-123) and merge it to default.""" | |
branch = "fb-" + node | |
close_branch(branch, ui, repo, node, **opts) |
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
def request = mockRequest.requestContent | |
log.info "CA Request: $request" | |
def payload = new XmlSlurper().parseText(request) | |
def csr = "${payload.Body.issueCertificate.paramIn.pkcs10}" | |
def temp = File.createTempFile('temp', '.csr') | |
temp.deleteOnExit() | |
temp.write(csr) |
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
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-enforcer-plugin</artifactId> | |
<version>1.4</version> | |
<executions> | |
<execution> | |
<id>enforce-banned-dependencies</id> | |
<goals> | |
<goal>enforce</goal> | |
</goals> |
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 javax.enterprise.context.SessionScoped; | |
import java.io.Serializable; | |
import java.util.concurrent.atomic.AtomicInteger; | |
@SessionScoped | |
public class Counter implements Serializable { | |
private AtomicInteger count = new AtomicInteger(0); | |
public void increase() { |
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
var binding = new BasicHttpBinding {AllowCookies = true}; | |
using (var svc = new ServiceReference1.MyWSClient(binding, new EndpointAddress("http://localhost:8080/myApp/myWS"))); |