Skip to content

Instantly share code, notes, and snippets.

View bahacan19's full-sized avatar

Baha Can Aydın bahacan19

View GitHub Profile
@bahacan19
bahacan19 / YourFragment.kt
Created February 26, 2019 06:56 — forked from rylexr/YourFragment.kt
Android navigation bar style with animation
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View {
binding = DataBindingUtil.inflate(inflater, R.layout.your_fragment, container, false)
binding.homeAction.setOnClickListener { select(R.id.home_action) }
binding.likesAction.setOnClickListener { select(R.id.likes_action) }
binding.searchAction.setOnClickListener { select(R.id.search_action) }
binding.profileAction.setOnClickListener { select(R.id.profile_action) }
return binding.root
}
fun select(id: Int) {
//
// main.c
// C_playground
//
// Created by Baha Can Aydın on 08/05/2018.
// Copyright © 2018 Baha Can Aydın. All rights reserved.
//
#include <stdio.h>
@bahacan19
bahacan19 / chunker.py
Last active February 12, 2019 10:06
chuck puller
#originally----->>>>> https://code.luasoftware.com/tutorials/ffmpeg/how-to-download-ts-stream-video-as-mp4/
import os
import grequests
# name of the video
name = 'DipBirinciBolum'
# .ts URL of the video, replace segment number with {0}
source_url = 'https://vcdn.puhutv.com/37f6afc657221d2f237772b8c03117ab39a96640bc4a70dea43ec7f94e77f85a/hls/2160p/chunklist-{0}.ts?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiKiIsIkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6IDE1MjU3OTc3Nzl9fX1dfQ==&Expires=1525797779&Signature=Ic91Cc~kjviIm~Uo5TMiRJgfe~yMRe5Qm0Q7RXaAdU3cGhhf~KOQvP6ZCeMeFH3GyPtpuxDQkUS2IGxMrdsBRPRZaiMfJrFPsmdigsUYquA-or8HTSsgAz2vrckiNX7rJGcIFXU1ylr7mbm~xkBcGTYMDrWdUS8j~S9edIOcR9Cuifv1sTnKLmvh3wdUnBHVqpPQT2fE1wDerHvrNTK~Moys78q65SYvCVT9N6mbDsjkVOGlSa75LiaP5BH0Xx2GYpYjYHvKzINo17Pt52h3iaTyOiSgmP5hL0Qbyqb8Q8wmCzIiuKADK-H6JsNAquBQZrm5Zrms9FjQ3KSa9hgonA__&Key-Pair-Id=APKAIZEE37VAVFSDJO5Q'
if not os.path.exists(name):
@bahacan19
bahacan19 / remove clion or jetbrains ide
Last active December 15, 2017 06:32
remove visual studio code from your pc
Move the .app file to the Trash, then manually delete the support folders listed in this IntelliJ support article:
~/Library/Preferences/
~/Library/Caches/
~/Library/Application Support/
~/Library/Logs/
@bahacan19
bahacan19 / defansive.c
Last active December 14, 2017 17:05
HARUN C ödev
#include <stdio.h>
int main() {
int N1, N2, sonuc;
printf("iki sayı giriniz her sayı girdiğinizde enter e basınız= \n");
while(scanf("%d %d", &N1, &N2) != 2)
{
printf("Sayı Girin lütfen!!! \n");
while(getchar() != '\n');