Skip to content

Instantly share code, notes, and snippets.

View uurtech's full-sized avatar
✈️
Works

Ugur KAZDAL uurtech

✈️
Works
View GitHub Profile
<?php
/**
* Create a web friendly URL slug from a string.
*
* Although supported, transliteration is discouraged because
* 1) most web browsers support UTF-8 characters in URLs
* 2) transliteration causes a loss of information
*
* @author Sean Murphy <sean@iamseanmurphy.com>
* @copyright Copyright 2012 Sean Murphy. All rights reserved.
/*! Copyright (c) 2011 Piotr Rochala (http://rocha.la)
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
*
* See working example at http://rocha.la/fun-with-pixels-html5-video-canvas
*
*/
var canvasVideo = function()
{
var $ = jQuery,
@uurtech
uurtech / Dockerfile
Created October 4, 2018 09:23
Docker Ubuntu & PHP & Memcached & mongodb & git
FROM ubuntu:latest
RUN apt update && apt upgrade -y
ENV TZ=Europe/Istanbul
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN apt install apache2 -y
RUN echo "ServerName localhost" >> /etc/apache2/apache2.conf
RUN apt install -y curl
gitter(){
git add $1
echo "Enter Your Git Commit";
read commitMessage
git commit -m "$commitMessage"
echo "Enter Your Branch"
read branch
@uurtech
uurtech / Docker Rabbit MQ
Created March 11, 2019 20:18
Docker Rabbig MQ with Management
docker run -d --hostname my-rabbit --name some-rabbit -p 4369:4369 -p 5671:5671 -p 5672:5672 -p 15672:15672 rabbitmq
docker exec some-rabbit rabbitmq-plugins enable rabbitmq_management
<?php
$recaptcha = $_POST['g-recaptcha-response'];
if (!empty($recaptcha))
{
$google_url = "https://www.google.com/recaptcha/api/siteverify";
$secret = 'YOUR_SECRET';
$ip = $_SERVER['REMOTE_ADDR'];
$url = $google_url . "?secret=" . $secret . "&response=" . $recaptcha . "&remoteip=" . $ip;
$res = curlgetter($url);
version: '3.1'
services:
db:
image: mysql
command: --default-authentication-plugin=mysql_native_password
restart: always
ports:
- 3306:3306
version: '2'
services:
jenkins:
image: jenkins:latest
ports:
- 8080:8080
- 50000:50000
privileged: true
volumes:
- ./:/var/jenkins_home
@uurtech
uurtech / regex example
Last active June 12, 2019 07:40
Check if first and last letter same and vovels at the same time
function regexVar() {
var re = /^[a].*[a]$|^[e].*[e]$|^[i].*[i]$|^[o].*[o]$|^[u].*[u]$/;
return re;
}
[
{ "uni" : "Abdullah Gül Üniversitesi" },
{ "uni" : "Adana Alparslan Türkeş Bilim ve Teknoloji Üniversitesi" },
{ "uni" : "Adıyaman Üniversitesi" },
{ "uni" : "Afyon Kocatepe Üniversitesi" },
{ "uni" : "Afyonkarahisar Sağlık Bilimleri Üniversitesi" },
{ "uni" : "Akdeniz Üniversitesi" },
{ "uni" : "Aksaray Üniversitesi" },
{ "uni" : "Alanya Alaaddin Keykubat Üniversitesi" },
{ "uni" : "Amasya Üniversitesi" },