Skip to content

Instantly share code, notes, and snippets.

View dursunkoc's full-sized avatar
🏠
Working from home

Dursun Koc dursunkoc

🏠
Working from home
  • Istanbul, Turkiye
View GitHub Profile
@dursunkoc
dursunkoc / collection iteration
Last active December 10, 2015 04:48
iterating a Collection (List, Set etc)
Collection<T> coll = ...
Iterator<T> iter = coll.iterator();
while (iter.hasNext()){
T next = iter.next();
...
}
h1. Sublime Text 2 - Useful Shortcuts (Mac OS X)
h2. General
| *⌘T* | go to file |
| *⌘⌃P* | go to project |
| *⌘R* | go to methods |
| *⌃G* | go to line |
| *⌘KB* | toggle side bar |
| *⌘⇧P* | command prompt |
@dursunkoc
dursunkoc / IncrementalSGD.java
Created July 24, 2017 20:36 — forked from thvasilo/IncrementalSGD.java
A basic online SGD using the Flink stream API.
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@dursunkoc
dursunkoc / pom.xml
Last active August 11, 2017 22:28
A Sample pom file for link application with scala
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.aric.samples</groupId>
<artifactId>sml</artifactId>
<version>0.1</version>
<name>${project.artifactId}</name>
<description>Practical Introduction to Flink</description>
<licenses>
<license>
0xde161bb462730990d3540Ee5e1B48c35D0900259
@dursunkoc
dursunkoc / disable.sh
Created June 3, 2020 20:38
Disable bunch of #$!@ in Catalina
#!/bin/bash
# IMPORTANT: Don't forget to logout from your Apple ID in the settings before running it!
# IMPORTANT: You will need to run this script from Recovery. In fact, macOS Catalina brings read-only filesystem which prevent this script from working from the main OS.
# This script needs to be run from the volume you wish to use.
# E.g. run it like this: cd /Volumes/Macintosh\ HD && sh /Volumes/Macintosh\ HD/Users/sabri/Desktop/disable.sh
# WARNING: It might disable things that you may not like. Please double check the services in the TODISABLE vars.
# Get active services: launchctl list | grep -v "\-\t0"
# Find a service: grep -lR [service] /System/Library/Launch* /Library/Launch* ~/Library/LaunchAgents
package com.example.repository.support;
import org.reactivestreams.Publisher;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.repository.NoRepositoryBean;
import org.springframework.data.repository.reactive.ReactiveCrudRepository;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
import reactor.core.scheduler.Schedulers;