Skip to content

Instantly share code, notes, and snippets.

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

turgay can turgaycan

🏠
Working from home
View GitHub Profile
@turgaycan
turgaycan / delete-kafka-consumer-group.sh
Created February 17, 2022 07:40
Delete kafka consumer group
#!/bin/bash
##
#MIT License
#
#Copyright (c) 2018 Turgay Can
#
#Permission is hereby granted, free of charge, to any person obtaining a copy
#of this software and associated documentation files (the "Software"), to deal
#in the Software without restriction, including without limitation the rights
@turgaycan
turgaycan / delete-kafka-topic-messages.sh
Last active February 17, 2022 08:17
Delete kafka topic messages
#!/bin/bash
##
#MIT License
#
#Copyright (c) 2018 Turgay Can
#
#Permission is hereby granted, free of charge, to any person obtaining a copy
#of this software and associated documentation files (the "Software"), to deal
#in the Software without restriction, including without limitation the rights
@turgaycan
turgaycan / kafka-queue-check.sh
Last active February 17, 2022 08:17
Kafka consumer group topics' lags' check script
#!/bin/bash
##
#MIT License
#
#Copyright (c) 2018 Turgay Can
#
#Permission is hereby granted, free of charge, to any person obtaining a copy
#of this software and associated documentation files (the "Software"), to deal
#in the Software without restriction, including without limitation the rights
@turgaycan
turgaycan / gist:a251072d49db15a3f02de7841ec6e2bf
Created May 25, 2018 09:30
git clone all remote branches locally
#!/bin/bash
for branch in `git branch -a | grep remotes | grep -v HEAD | grep -v master `; do
git branch --track ${branch#remotes/origin/} $branch
done
@turgaycan
turgaycan / delete_orphaned_veth_docker.sh
Created February 28, 2018 10:47 — forked from daanemanz/delete_orphaned_veth_docker.sh
Delete orphaned veth* interfaces on Docker bridge
#!/bin/bash
veth_in_use=()
veth_unused=()
veth_all=()
function veth_interface_for_container() {
local pid=$(docker inspect -f '{{.State.Pid}}' "${1}")
mkdir -p /var/run/netns
ln -sf /proc/$pid/ns/net "/var/run/netns/${1}"
@turgaycan
turgaycan / Visual Basic Parameterized SQL UPDATE
Last active August 29, 2015 14:25
Parameterized SQL Update with input controls
private static string connString = "Data Source=localhost;Initial Catalog=Northwind;Integrated Security=SSPI"; //kendinize göre düzenleyin
private boolean checkNullForString(String val){
return val == null || val.Trim() == "";
}
public void save(){
String CihazAd = textBox1.Text;
if( checkNullForString(cihazAd)){
@turgaycan
turgaycan / Enum class abstract function implementation example
Last active August 29, 2015 14:24
JAVA - Enum class abstract function implementation example
public enum EnumClass {
ENUMVAL1{
@ Override
public boolean anyFilter(){
return false;
}
@ Override
public List<EnumClass> listOfAnyFilter(){
return Arrays.asList(ENUMVAL1, ENUMVAL2);