Skip to content

Instantly share code, notes, and snippets.

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 March 18, 2020 10:47
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
<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>
@hkarakose
hkarakose / timezones.html
Last active March 18, 2020 09:59
Timezones
<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 December 22, 2019 13:12
TC Kimlik No Uretme Kodu (Java)
package com.kodfarki.chargeback;
import org.junit.Test;
/**
* User: Halil Karakose
* Date: 2019-12-22
* Time: 15:38
*/
public class TcKimlikTest {
@hkarakose
hkarakose / Country Dropdown List
Created August 7, 2018 08:45
Country Dropdown
<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 August 7, 2018 08:30
Drop down widget for country field in HTML format
<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 14:12 — forked from ardamavi/get_dataset.py
For reading datasets and converting to numpy files.
# 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 February 1, 2018 20:35 — forked from ronlobo/countries.sql
Countries sql script
-- 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 ([email protected])
@hkarakose
hkarakose / ApplicationProperties.java
Created September 21, 2017 16:42
Following class print spring.datasource configuration properties in a spring-boot application. This class can be useful if used during application startup.
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 August 23, 2017 07:50
Gitlab CI script which starts a maven image and links it to a mysql service
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