Skip to content

Instantly share code, notes, and snippets.

View emreerkan's full-sized avatar
👋
There is no spoon!

Emre Erkan emreerkan

👋
There is no spoon!
View GitHub Profile
@emreerkan
emreerkan / wp-config.php
Created December 24, 2025 18:46
WordPress Debug Mode
<?php
// Your wp-config.php
define( 'WP_DEBUG', false );
if ( WP_DEBUG ) {
@error_reporting( E_ALL );
define( 'WP_DEBUG_LOG', true );
if ( WP_DEBUG_LOG ) {
define( 'WP_DEBUG_DISPLAY', false );
} else {
@emreerkan
emreerkan / Brewfile
Last active April 25, 2025 11:03
My brew bundle
# command-line utilities
brew "git"
brew "node"
brew "ffmpeg"
brew "cask"
brew "zsh"
brew "zsh-autosuggestions"
brew "zsh-completions"
brew "zsh-syntax-highlighting"
@emreerkan
emreerkan / humbebundle-dragonlance-rename.sh
Last active March 16, 2025 16:42
HumbeBundle Dragonlance file renamer
#!/bin/bash
declare -a books=(
"01-dragonsofautumntwilight.epub"
"02-dragonsofwinternight.epub"
"03-dragonsofspringdawning.epub"
"04-timeofthetwins.epub"
"05-warofthetwins.epub"
"06-testofthetwins.epub"
"07-soulforge.epub"
"08-brothersinarms.epub"
(function($) {
var female = female_percentage = male = male_percentage = 0, list = $('.col-md-6.col-sm-6 .panel-title a').map(function(i, item) { return item.href.replace('https://yokatlas.yok.gov.tr/lisans.php?y=', ''); });
$.when.apply($, list.map(function(i, item) {
var url = [ 'https://yokatlas.yok.gov.tr/content/lisans-dynamic/1010.php?y=', item ].join('');
return $.get(url, function(data) {
var $data = $(data);
female += parseInt('0'+$data.find('tbody tr:first td:eq(1)').text(), 10);
male += parseInt('0'+$data.find('tbody tr:last td:eq(1)').text(), 10);
}).promise();
}).get()).then(function() {
@emreerkan
emreerkan / compareVersions.js
Last active December 20, 2015 16:49
Compare two software versions (like 1.3 or 2.10.1434 etc) with an operator (<, >, >=, <=, ==, !=)
function compareVersions(left, operator, right) {
var i, il, bigger;
left = left.split('.');
right = right.split('.');
if('==' == operator && left.length == right.length) {
return left == right;
}
if('!=' == operator && left.length == right.length) {
return left != right;
}