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
awk '/^(\S+) \S+ \S+ \[([^\]]+)\] "([A-Z]+)[^"]*" \d+ \d+ "[^"]*" "([^"]*)"$/m ($6 == "\"GET") && ($9 == 200) && !($7 ~ /^\/_analytics/) && !($7 ~ /^\/arama/) && !($7 ~ /^\/programlar\?q/) && !($7 ~ /^\/uzmanlar\?search/) && !($7 ~ /^\/app\/vplayer\/getsibling.tv/) {print $7}' access.log | uniq > access_log_filtered.log |
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
package net.nobien.cloudfoundry.example.config; | |
import java.util.Properties; | |
import org.cloudfoundry.runtime.env.CloudEnvironment; | |
import org.cloudfoundry.runtime.env.CloudEnvironmentPropertiesFactoryBean; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import org.springframework.context.ApplicationContextInitializer; | |
import org.springframework.core.env.ConfigurableEnvironment; |
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
/* Extend the Underscore object with the following methods */ | |
// Rate limit ensures a function is never called more than every [rate]ms | |
// Unlike underscore's _.throttle function, function calls are queued so that | |
// requests are never lost and simply deferred until some other time | |
// | |
// Parameters | |
// * func - function to rate limit | |
// * rate - minimum time to wait between function calls | |
// * async - if async is true, we won't wait (rate) for the function to complete before queueing the next request |
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.yourkit.probes.*; | |
import com.yourkit.api.*; | |
@MethodPattern("scala.tools.nsc.Global$Run:advancePhase()") | |
public class MemoryProbe { | |
public static void onEnter(@This scala.tools.nsc.Global.Run run) { | |
scala.reflect.internal.Phase patmatPhase = run.phaseNamed("patmat"); | |
scala.reflect.internal.Phase postErasurePhase = run.phaseNamed("posterasure"); | |
scala.reflect.internal.Phase icodePhase = run.phaseNamed("icode"); |
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
description "service" | |
start on filesystem | |
stop on runlevel S | |
respawn | |
respawn limit 10 5 | |
oom never | |
kill timeout 86400 #If it's given a stop order, this is how long it will take to stop. |
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
@Override | |
public ServletContainer getJerseyContainer(DropwizardResourceConfig resourceConfig, | |
MyServiceConfig serviceConfig) { | |
// I like having a root module, but you can use as many as you like | |
final Injector injector = Guice.createInjector(new MyServiceModule(serviceConfig)); | |
return new GuiceContainer(injector) { | |
@Override | |
public ResourceConfig getDefaultResourceConfig(Map<String,Object> props, WebConfig webConfig) { |
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
#!/usr/bin/env python | |
import sys | |
import os | |
import json | |
import argparse | |
import collections | |
__description__ = """Ansible Dynamic Inventory for Terraform.""" | |
__epilog__ = """ |
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
//First create the httpClient in Dropwizard's run method as documented | |
final HttpClient httpClient = new HttpClientBuilder().using(configuration.getHttpClient()).build(); | |
try { | |
//Create KeyStore obejcts for both the keystore and truststore | |
KeyStore keystore = KeyStore.getInstance(KeyStore.getDefaultType()); | |
KeyStore truststore = KeyStore.getInstance(KeyStore.getDefaultType()); | |
//Then load the actual keystore/truststore file(s), they are the same file in my case | |
keystore.load(new FileInputStream(configuration.getKeyStore()), configuration.getKeyStorePassword().toCharArray()); |
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
/* ============================================================= | |
* bootstrap-scrollspy.js v2.0.1 | |
* http://twitter.github.com/bootstrap/javascript.html#scrollspy | |
* ============================================================= | |
* Copyright 2012 Twitter, Inc. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* |
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
# stacktrace java as one message | |
multiline { | |
#type => "all" # no type means for all inputs | |
pattern => "(^.+Exception: .+)|(^\s+at .+)|(^\s+... \d+ more)|(^\s*Caused by:.+)" | |
what => "previous" | |
} | |
OlderNewer