Skip to content

Instantly share code, notes, and snippets.

View CurrentThreadContext.java
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.HashMap;
/**
* User: ehaskah
* Date: 26/10/11
* Time: 22:29
*/
@hkarakose
hkarakose / timezones_without_deprecated.html
Last active Mar 18, 2020
Location based timezone list in HTML SELECT form. Deprecated timezones are removed based on this list: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
View timezones_without_deprecated.html
<select id="user-timezone" class="form-control">
<option value='Africa/Abidjan'>Africa/Abidjan</option>
<option value='Africa/Accra'>Africa/Accra</option>
<option value='Africa/Addis_Ababa'>Africa/Addis_Ababa</option>
<option value='Africa/Algiers'>Africa/Algiers</option>
<option value='Africa/Asmara'>Africa/Asmara</option>
<option value='Africa/Asmera'>Africa/Asmera</option>
<option value='Africa/Bamako'>Africa/Bamako</option>
<option value='Africa/Bangui'>Africa/Bangui</option>
<option value='Africa/Banjul'>Africa/Banjul</option>
View timezones.html
<select id="timezone_string" name="timezone_string" aria-describedby="timezone-description">
<optgroup label="Africa">
<option value="Africa/Abidjan">Abidjan</option>
<option value="Africa/Accra">Accra</option>
<option value="Africa/Addis_Ababa">Addis Ababa</option>
<option value="Africa/Algiers">Algier</option>
<option value="Africa/Asmara">Asmara</option>
<option value="Africa/Bamako">Bamako</option>
<option value="Africa/Bangui">Bangui</option>
<option value="Africa/Banjul">Banjul</option>
@hkarakose
hkarakose / TcKimlikTest.java
Created Dec 22, 2019
TC Kimlik No Uretme Kodu (Java)
View TcKimlikTest.java
package com.kodfarki.chargeback;
import org.junit.Test;
/**
* User: Halil Karakose
* Date: 2019-12-22
* Time: 15:38
*/
public class TcKimlikTest {
View Country Dropdown List
<select>
<option value="Afghanistan">Afghanistan</option>
<option value="Albania">Albania</option>
<option value="Algeria">Algeria</option>
<option value="American Samoa">American Samoa</option>
<option value="Andorra">Andorra</option>
<option value="Angola">Angola</option>
<option value="Anguilla">Anguilla</option>
<option value="Antartica">Antarctica</option>
<option value="Antigua and Barbuda">Antigua and Barbuda</option>
@hkarakose
hkarakose / country.html
Created Aug 7, 2018
Drop down widget for country field in HTML format
View country.html
<select class="form-control" name="subscriber.shippingCountry" id="shippingAddress_country" autocomplete="country-name"><option value=""></option>
<option value="US">United States</option>
<option value="GB">United Kingdom</option>
<option value="CA">Canada</option>
<option value="NZ">New Zealand</option>
<option value="AU">Australia</option>
<option value="ZA">South Africa</option>
<option value="SG">Singapore</option>
<option value="--">--</option>
<option value="AF">Afghanistan</option>
@hkarakose
hkarakose / get_dataset.py
Created May 6, 2018 — forked from ardamavi/get_dataset.py
For reading datasets and converting to numpy files.
View get_dataset.py
# Arda Mavi
import os
import numpy as np
from os import listdir
from scipy.misc import imread, imresize
from keras.utils import to_categorical
from sklearn.model_selection import train_test_split
# Settings:
img_size = 64
@hkarakose
hkarakose / countries.sql
Created Feb 1, 2018 — forked from ronlobo/countries.sql
Countries sql script
View countries.sql
-- phpMyAdmin SQL Dump
-- version 3.2.0.1
-- http://www.phpmyadmin.net
--
-- Serveur: localhost
-- Généré le : Jeu 04 Mars 2010 à 12:12
-- Version du serveur: 5.1.36
-- Version de PHP: 5.3.0
-- Autor : Thomas Tourlourat (thomas@tourlourat.com)
@hkarakose
hkarakose / ApplicationProperties.java
Created Sep 21, 2017
Following class print spring.datasource configuration properties in a spring-boot application. This class can be useful if used during application startup.
View ApplicationProperties.java
package com.kodfarki.scheduler;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
/**
* User: Halil Karakose
* Date: 21/09/2017
* Time: 19:31
*/
@hkarakose
hkarakose / .gitlab-ci.yml
Created Aug 23, 2017
Gitlab CI script which starts a maven image and links it to a mysql service
View .gitlab-ci.yml
image: maven:3-jdk-8
services:
# mysql hostname is 'mysql'. You should configure your db configuration so that it connects to 'mysql' host.
- mysql:latest
variables:
# Configure mysql environment variables (https://hub.docker.com/r/_/mysql/)
MYSQL_DATABASE: REPLACE_WITH_YOUR_DB_NAME
MYSQL_ROOT_PASSWORD: REPLACE_WITH_YOUR_ROOT_PASSWORD