Skip to content

Instantly share code, notes, and snippets.

View yilmazerhakan's full-sized avatar
🏠
Working from home

Hakan Yılmazer yilmazerhakan

🏠
Working from home
View GitHub Profile
-- Create test training data (%80) from ML-100K
CREATE TABLE ratings2
as
select
rand() as rnd,
userid,
movieid,
rating
from
@yilmazerhakan
yilmazerhakan / User.php
Created October 14, 2018 10:31
Consisted Restore of Soft Deleted Models with Relations in Laravel
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class Users extends Model
{
use SoftDeletes;
@yilmazerhakan
yilmazerhakan / gist:8f997534ecb4b16a395d55deafbff625
Created December 10, 2017 21:50 — forked from entaroadun/gist:1653794
Recommendation and Ratings Public Data Sets For Machine Learning

Movies Recommendation:

Music Recommendation:

@yilmazerhakan
yilmazerhakan / nginx.conf
Created August 5, 2016 10:33 — forked from StefanoChiodino/nginx.conf
Nginx pagespeed modules
pagespeed EnableFilters responsive_images;
pagespeed EnableFilters outline_css;
pagespeed EnableFilters outline_javascript;
pagespeed EnableFilters move_css_above_scripts;
pagespeed EnableFilters move_css_to_head;
pagespeed EnableFilters rewrite_style_attributes;
pagespeed EnableFilters prioritize_critical_css;
pagespeed EnableFilters make_google_analytics_async;
pagespeed EnableFilters canonicalize_javascript_libraries;
pagespeed EnableFilters inline_google_font_css;
DROP FUNCTION IF EXISTS slugify;
DELIMITER ;;
CREATE DEFINER='root'@'localhost'
FUNCTION slugify (temp_string VARCHAR(200) CHARSET utf8)
RETURNS VARCHAR(200)
DETERMINISTIC
BEGIN
DECLARE x, y , z Int;
DECLARE new_string VARCHAR(200);
DECLARE is_allowed Bool;
@yilmazerhakan
yilmazerhakan / gist:8359806024aa6430a3ae
Last active August 29, 2015 14:27 — forked from jacqui/gist:983051
Redis SORT command examples
# Optimized for writes, sort on read
# LVC
redis.hset("bonds|1", "bid_price", 96.01)
redis.hset("bonds|1", "ask_price", 97.53)
redis.hset("bonds|2", "bid_price", 95.50)
redis.hset("bonds|2", "ask_price", 98.25)
redis.sadd("bond_ids", 1)
redis.sadd("bond_ids", 2)
@yilmazerhakan
yilmazerhakan / install_jenkins.sh
Last active April 5, 2018 15:09
Installing Jenkins on Homestead / Laravel
# Installing Jenkins for PHP Continious Integration of laravel/homestead
# 8 Must Have PHP Quality Assurance Tools
composer global require "phpunit/phpunit=4.1.*"
composer global require behat/behat='~3.0.6'
composer global require 'phploc/phploc=*'
composer global require 'phpmd/phpmd=*'
composer global require 'squizlabs/php_codesniffer=*'
composer global require 'sebastian/phpcpd=*'
composer global require 'sebastian/phpdcd=*'
# A list of possible usernames to reserve to avoid
# vanity URL collision with resource paths
# It is a merged list of the recommendations from this Quora discussion:
# http://www.quora.com/How-do-sites-prevent-vanity-URLs-from-colliding-with-future-features
# Country TLDs found here:
# http://en.wikipedia.org/wiki/List_of_Internet_top-level_domains#Country_code_top-level_domains
# Languages found here: