Skip to content

Instantly share code, notes, and snippets.

View nyilmaz's full-sized avatar

Nurettin Yılmaz nyilmaz

View GitHub Profile
212.156.51.102 - erhan-7142783:329680 [26/Mar/2014:14:00:13 +0200] "GET /arama/k/0Zddddddddd/tarihe-gore/ct/2 HTTP/1.1" 404 32816 "-" "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.154 Safari/537.36" 577 577
212.156.51.102 - - [26/Mar/2014:14:02:38 +0200] "GET /arama/k/0Zddddddddd/tarihe-gore/ct/2 HTTP/1.1" 404 32671 "-" "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.154 Safari/537.36" 788 788
192.168.139.9 - - [26/Mar/2014:14:03:43 +0200] "GET /favicon.ico HTTP/1.1" 404 1278 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.152 Safari/537.36" 2 2
192.168.139.11 - - [26/Mar/2014:14:09:15 +0200] "GET /favicon.ico HTTP/1.1" 404 1278 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.152 Safari/537.36" 1 1
212.156.51.102 - - [26/Mar/2014:14:09:37 +0200] "GET /arama/tango/p3 HTTP/1.1" 404 32671 "-" "Mozilla/5.
95.6.94.41 - - [26/Mar/2014:14:00:24 +0200] "GET /embed/uzman-embed-v3.swf?v=prVTAD8eBdZ&no=639&jingle=yeme-ve-icme.mp4&referer=NdrPFWG5V8h&tit=Kol%20b%C3%B6re%C4%9Fi%20nas%C4%B1l%20yap%C4%B1l%C4%B1r?&urltit=kol-boregi-nasil-yapilir&subject=KOL%20B%C3%96RE%C4%9E%C4%B0%20NASIL%20HAZIRLANIR&surltit=kol-boregi-nasil-hazirlanir&ext=mp4 HTTP/1.1" 404 32671 "http://www.lezzetli.com/yemek-tarifleri/hamur-isi/borek/kol-boregi" "Mozilla/5.0 (Windows NT 6.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.154 Safari/537.36" 10 10
65.55.24.215 - - [26/Mar/2014:14:00:30 +0200] "GET /etiket/haz%C4%B1r-biber-fidesi/e/16890 HTTP/1.1" 404 32671 "-" "Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)" 13 13
65.55.24.215 - - [26/Mar/2014:14:01:29 +0200] "GET /konu/rahat-bir-hamilelik-icin/3 HTTP/1.1" 404 32671 "-" "Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)" 9 9
157.56.92.146 - - [26/Mar/2014:14:01:31 +0200] "GET /etiket/lezyon/p4 HTTP/1.1" 404 32671 "-" "Mozilla/5.0 (c
package pipe.plug.security.processor;
import org.springframework.security.access.ConfigAttribute;
import org.springframework.security.web.FilterInvocation;
import org.springframework.security.web.access.channel.SecureChannelProcessor;
import org.springframework.util.Assert;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
http
.sessionManagement()
.sessionCreationPolicy(SessionCreationPolicy.IF_REQUIRED)
.and()
.servletApi()
.and()
.formLogin()
.loginPage("/giris")
.successHandler(simpleUrlAuthenticationHandler)
.failureHandler(simpleUrlAuthenticationHandler)
@nyilmaz
nyilmaz / gist:9601279
Created March 17, 2014 15:23
memcached
WARN [2014-03-17 15:22:32,362] com.google.code.ssm.transcoders.JsonTranscoder: Error deserializing cached data CachedObjectWrapper [cachedData={CachedData flags=264 data=[123, 34, 118, 34, 58, 123, 34, 99, 111, 109, 46, 103, 111, 111, 103, 108, 101, 46, 99, 111, 109, 109, 111, 110, 46, 99, 111, 108, 108, 101, 99, 116, 46, 76, 105, 115, 116, 115, 36, 84, 114, 97, 110, 115, 102, 111, 114, 109, 105, 110, 103, 82, 97, 110, 100, 111, 109, 65, 99, 99, 101, 115, 115, 76, 105, 115, 116, 34, 58, 91, 123, 34, 112, 105, 112, 101, 46, 112, 108, 117, 103, 46, 118, 105, 100, 101, 111, 46, 98, 101, 97, 110, 46, 86, 105, 100, 101, 111, 73, 110, 102, 111, 34, 58, 123, 34, 73, 68, 34, 58, 49, 48, 53, 51, 55, 57, 57, 125, 125, 44, 123, 34, 112, 105, 112, 101, 46, 112, 108, 117, 103, 46, 118, 105, 100, 101, 111, 46, 98, 101, 97, 110, 46, 86, 105, 100, 101, 111, 73, 110, 102, 111, 34, 58, 123, 34, 73, 68, 34, 58, 49, 48, 52, 56, 57, 53, 54, 125, 125, 44, 123, 34, 112, 105, 112, 101, 46, 112, 108, 117, 103, 46, 118, 105, 100, 101
public SearchResult<Integer> searchRelatedVideos(int videoId, int length) {
Cache<String, SearchResult<Integer>> cache = cacheFactory.getMemcachedMagnetCache("relatedvideo-cache");
String key = "related/" + videoId + "/" + length;
SearchResult<Integer> result = cache.get(key);
if(result != null && result.getSize() != 0) {
logger.debug("Related videos found in cache for video : " + videoId);
return result;
}
VideoInfo video = videoInfoService.getVideoInfo(videoId);
package magnet.support.mail.queue.builder;
import com.google.common.collect.Maps;
import magnet.support.mail.queue.entity.MailQueueEntity;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.util.Assert;
import java.util.Date;
54.236.252.200 uzmantv.com - [28/Feb/2014:23:55:03 +0200] "GET /embed/uzman-embed-v2.swf?v=ZTT0Q0rnbCb&no=862&jingle=saglik.mp4&referer=d0VrdMvBsnS&tit=K%C4%B1zl%C4%B1k%20zar%C4%B1%20y%C4%B1rt%C4%B1ld%C4%B1%C4%9F%C4%B1nda%20ac%C4%B1%20verir%20mi?&urltit=kizlik-zari-yirtildiginda-aci-verir-mi&subject=KIZLIK%20ZARI%20HAKKINDA%20MERAK%20ED%C4%B0LENLER&surltit=kizlik-zari-hakkinda-merak-edilenler&ext=flv HTTP/1.1" 200 91439 "http://www.sagliklica.com/admin/cinsel-yasam-ve-cinsel-saglik/kizlik-zari-nasil-bozulur-resimli-anlatim-video-kizlik-nasil-bozulur-uygulamali-anlatim.html" "Mozilla/5.0 (Series40; Nokia501s/10.0.15; Profile/MIDP-2.1 Configuration/CLDC-1.1) Gecko/20100401 S40OviBrowser/3.0.0.0.75" "BIGipServercom.uzmantv.www.pool.http=453708298.20480.0000; TS2b1e4d=1ae00adf8fd9bb1c0ae20bc34ba947e373ca2aab3f2a19d05311057cc416f74d9f7ddfc8"
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
Apple-MacBook-Pro:logs nurettin.yilmaz$ awk '/^(\S+) \S+ \S+ \[([^\]]+)\] "([A-Z]+)[^"]*" \d+ \d+ "[^"]*" "([^"]*)"$/m {print $6 "\n" $7 "\n" $8 "\n" $9}' example.log
"GET
/etiket/penis-e%C4%9Frili%C4%9Fi-d%C3%BCzeltme-ameliyat%C4%B1
HTTP/1.1"
200