Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View csonuryilmaz's full-sized avatar
Coding

Onur Yılmaz csonuryilmaz

Coding
View GitHub Profile
@csonuryilmaz
csonuryilmaz / test-date.php
Created December 25, 2018 09:58
Comparing input date with today and decide given input ise history || today || future
$data["day"]="25";
$data["month"]="01";
$data["year"]="2017";
$post = strtotime($data['day']."-".$data['month']."-".$data['year']);
echo $post;
echo "<br/>";
$ctrl = strtotime(date('d-m-Y'));
echo $ctrl;
echo "<br/>";
@csonuryilmaz
csonuryilmaz / ruby_for_debian.md
Last active August 22, 2020 23:39
Ruby 2 for Debian Wheezy

Ruby 2 for Debian Wheezy

The Problem

Debian Wheezy provides Ruby version 1.9.3. If you want to install a newer version, you need to do that manually. But you don't want to mess with your system Ruby. There are Ruby version managers like rbenv to solve that problem. Unfortunately, Debian's rbenv is out of date as well. You will need to install a newer version of [rbenv] and the [ruby-build] plugin.

@csonuryilmaz
csonuryilmaz / clone-mysql-db.sh
Last active October 27, 2021 09:35 — forked from christopher-hopper/clone-mysql-db.sh
Clone a MySQL database to a new database on the same server without using a dump file. This is much faster than using mysqldump.
#!/bin/bash
DBUSER="root";
DBPASS="";
DBHOST="localhost";
DB_OLD=mydatabase
DB_NEW=clone_mydatabase
DBCONN="--host=${DBHOST} --user=${DBUSER} --password=${DBPASS}";
@csonuryilmaz
csonuryilmaz / SSLPoke.java
Created April 20, 2023 15:23 — forked from 4ndrej/SSLPoke.java
Test of java SSL / keystore / cert setup. Check the comment #1 for howto.
import javax.net.ssl.SSLParameters;
import javax.net.ssl.SSLSocket;
import javax.net.ssl.SSLSocketFactory;
import java.io.*;
/** Establish a SSL connection to a host and port, writes a byte and
* prints the response. See
* http://confluence.atlassian.com/display/JIRA/Connecting+to+SSL+services
*/
public class SSLPoke {