Skip to content

Instantly share code, notes, and snippets.

@tosunkaya
tosunkaya / gist:0a88957a6c14afd9ba13
Created February 27, 2016 15:34 — forked from mwolff44/gist:abfc7848e5cfa35b8c6a
remove jetpack unwanted css - Wordpress
<?php
/*
MU Plugin: remove-jetpack-css
Plugin Name: WP Remove Jetpack CSS
Plugin URI: http://www.blog-des-telecoms.com
Description: Remove jetpack CSS
Version: 1.0
Author: Mathias WOLFF
Author URI: http://www.mathias-wolff.fr
License: GPLv3
@tosunkaya
tosunkaya / .htaccess
Created June 20, 2016 20:18 — forked from meaku/.htaccess
.htaccess for SSL via SNI to prevent the certificate-error for unsupported browsers. Always share http links and https will be used if supported. Otherwise the connection will be http. SNI is not supported on IE on Windows XP (5 - 8) and Android < 4.x __Important Note__ Don't use this .htaccess if you need HTTPS for all your clients. It is just …
# HTTP(S) Stuff
# Redirect all users except IE 5-8 & Android < 4 to HTTPS
RewriteCond %{SERVER_PORT} !^443$
RewriteCond %{HTTP_USER_AGENT} !MSIE\ [5-8]
RewriteCond %{HTTP_USER_AGENT} !Android.*(Mobile)?\ [0-3]
RewriteRule (.*) https://%{HTTP_HOST}/$1 [L]
@tosunkaya
tosunkaya / jquery-svg-1.4.5-.js
Created December 1, 2018 10:11
jquery-svg-1.4.5-.js used on https://tosunkaya.com
!function(p){function t(){this._settings=[],this._extensions=[],this.regional=[],this.regional[""]={errorLoadingText:"Error loading",notSupportedText:"This browser does not support SVG"},this.local=this.regional[""],this._uuid=(new Date).getTime(),this._renesis=function(t){try{return!(!window.ActiveXObject||!new ActiveXObject(t))}catch(t){return!1}}("RenesisX.RenesisCtrl")}var i="svgwrapper";function e(t,e){this._svg=t,this._container=e;for(var n=0;n<p.svg._extensions.length;n++){var r=p.svg._extensions[n];this[r[0]]=new r[1](this)}}function n(){this._path=""}function r(){this._parts=[]}function l(t){return t&&t.constructor==Array}p.extend(t.prototype,{markerClassName:"hasSVG",svgNS:"http://www.w3.org/2000/svg",xlinkNS:"http://www.w3.org/1999/xlink",_wrapperClass:e,_attrNames:{class_:"class",in_:"in",alignmentBaseline:"alignment-baseline",baselineShift:"baseline-shift",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",col
/* http://keith-wood.name/svg.html
SVG for jQuery v1.4.5.
Written by Keith Wood (kbwood{at}iinet.com.au) August 2007.
Dual licensed under the GPL (http://dev.jquery.com/browser/trunk/jquery/GPL-LICENSE.txt) and
MIT (http://dev.jquery.com/browser/trunk/jquery/MIT-LICENSE.txt) licenses.
Please attribute the author if you use it. */
(function($) { // Hide scope, no $ conflict
/* SVG manager.
/**
* Set Cookie
*
* @param cname
* @param cvalue
* @param exdays
*/
function setCookie( cname, cvalue, exdays ) {
var d = new Date();
d.setTime(d.getTime() + (exdays*24*60*60*1000));
@tosunkaya
tosunkaya / WP Coupon - export
Created November 29, 2019 13:05 — forked from Longkt/WP Coupon - export
Fix the expired date and filter coupon store
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
require WP_COUPON_IE_PATH.'vendor/autoload.php';
use PhpOffice\PhpSpreadsheet\Helper\Sample;
use PhpOffice\PhpSpreadsheet\IOFactory;
use PhpOffice\PhpSpreadsheet\Spreadsheet;
// Sort by Popularity default in Category coupon page
add_action( 'init', function() {
remove_action( 'wpcoupon_coupon_category_before_sidebar', 'wpcoupon_coupon_cat_filter_box', 10 );
remove_filter( 'pre_get_posts', 'wpcoupon_coupon_cat_query' );
add_action( 'wpcoupon_coupon_category_before_sidebar', 'custom_wpcoupon_coupon_cat_filter_box', 10 );
add_filter( 'pre_get_posts', 'custom_wpcoupon_coupon_cat_query' );
} );
@tosunkaya
tosunkaya / readme.md
Created December 21, 2019 15:37 — forked from troyfontaine/readme.md
Resize root partition (or how to remove the default /home partition) on CentOS 7 online

Resize root partition (or how to remove the default /home partition) on CentOS 7 online

This requires you to be able to ssh into the instance using the root user account and that no services be running as users out of /home on the target machine.

The examples are from a default installation with no customation-you NEED to know what you're working with for volumes/partitions to not horribly break things.

By default, CentOS 7 uses XFS for the file system and Logical Volume Manager (LVM), creating 3 partitions: /,/home and

Step 1 - Copy /home Contents

To backup the contents of /home, do the following:

@tosunkaya
tosunkaya / BlinkAll.c
Created May 16, 2020 08:03 — forked from Corinrypkema/BlinkAll.c
Arduino Blink All Pins
/*
Blink
Turns on an LED on for one second, then off for one second, repeatedly.
This example code is in the public domain.
*/
// Pin 13 has an LED connected on most Arduino boards.
// Pin 11 has the LED on Teensy 2.0
// Pin 6 has the LED on Teensy++ 2.0
#EXTM3U
#EXTINF:-1,BBC - Radio 1
http://bbcmedia.ic.llnwd.net/stream/bbcmedia_radio1_mf_p
#EXTINF:-1,BBC - Radio 2
http://bbcmedia.ic.llnwd.net/stream/bbcmedia_radio2_mf_p
#EXTINF:-1,BBC - Radio 3
http://open.live.bbc.co.uk/mediaselector/5/select/version/2.0/mediaset/http-icy-aac-lc-a/format/pls/vpid/bbc_radio_three.pls
#EXTINF:-1,BBC - Radio 4
http://bbcmedia.ic.llnwd.net/stream/bbcmedia_radio4fm_mf_p
#EXTINF:-1,BBC - Radio 5 live