Skip to content

Instantly share code, notes, and snippets.

@mcihad
mcihad / wordlist.txt
Created February 22, 2024 18:13
Turkish Wordlist
Word
bir
bu
ve
ne
için
mi
ben
çok
de
@mcihad
mcihad / main.go
Created February 22, 2024 18:13
Sqlite Fts and Normal Like Test
package main
import (
"bufio"
"database/sql"
"log"
"math/rand"
"os"
"time"
@mcihad
mcihad / main.go
Created January 7, 2024 17:59
Point in Polygon algorithm and parse coordinates from kml file
package main
import (
"encoding/xml"
"fmt"
"os"
"strconv"
"strings"
)
@mcihad
mcihad / choice_from_db.py
Created July 19, 2023 06:49
django choices özelliğinin veritabanından alınması
class Birim(models.Model):
kisa_ad = models.CharField(_("Kısa Ad"), max_length=50)
ad = models.CharField(_("Ad"), max_length=50)
class Meta:
verbose_name = _("Birim")
verbose_name_plural = _("Birimler")
def __str__(self):
return self.ad
package main
import (
"fmt"
"math"
"strings"
)
var birlerList = [...]string{"", "Bir", "İki", "Üç", "Dört", "Beş", "Altı", "Yedi", "Sekiz", "Dokuz"}
var onlarList = [...]string{"", "On", "Yirmi", "Otuz", "Kırk", "Elli", "Altmış", "Yetmiş", "Seksen", "Doksan"}
public class NumberWorker: BackgroundService
{
private readonly ILogger<TimeWorker> _logger;
private readonly ChannelReader<int> _channel;
public NumberWorker(ILogger<TimeWorker> logger, ChannelReader<int> channel)
{
_logger = logger;
_channel = channel;
}
@mcihad
mcihad / main.go
Created December 25, 2022 10:11
Soap Servislerinden Go Programlama Dili İle Kimlik Doğrulama
package main
import (
"bytes"
"encoding/xml"
"fmt"
"io/ioutil"
"net/http"
"text/template"
)
@mcihad
mcihad / index.py
Created December 17, 2022 18:09
Telegram Bot. Download youtube video and send
import os
import asyncio
import youtube_dl
import logging
from urllib.parse import urlparse
from telegram import __version__ as TG_VER
try:
from telegram import __version_info__
@mcihad
mcihad / event_emitter.go
Created November 20, 2022 19:27
Golang EventEmitter
package main
import "fmt"
type EventFunc = func(i interface{})
type Event struct {
Funcs []EventFunc
Once bool
CallCounter int
@mcihad
mcihad / gecikme_hesap.dart
Created April 17, 2020 16:36
Gelir İdaresi Başkanlığının Verilerine Göre Gecikme Zammı Hesabı
import 'package:date_calc/date_calc.dart';
import 'package:test/test.dart';
import 'package:intl/intl.dart';
class DateDifference {
int years;
int months;
int days;
DateDifference(this.years, this.months, this.days);