This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if test -f /etc/profile.d/git-sdk.sh | |
then | |
TITLEPREFIX=SDK-${MSYSTEM#MINGW} | |
else | |
TITLEPREFIX=$MSYSTEM | |
fi | |
PS1='\[\033]0;$TITLEPREFIX:${PWD//[^[:ascii:]]/?}\007\]' # set window title | |
PS1="$PS1"'\n' # new line |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
File: Gruntfile.js | |
Author: Gkiokan Sali | |
Date: 2.12.2016 | |
Comments: Grunfile.js Configuration for new Projects | |
usage: | |
I've prepared a nicely structure for running with grunt. | |
All your source development files will be in assets/src. | |
Beneath that you split up your code in /js and /sass folders. | |
By default as the code is, javascript and css will be compiled to |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$content = file_get_contents($cc_uri); | |
$content = preg_replace('/[\x00-\x1F\x80-\xFF]/', '', $content); | |
$content = json_decode($content,true); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
GistName: WP Error Handling | |
Author: Gkiokan Sali | |
Url: www.gkiokan.net | |
Description: | |
Use this for debugging activision errors. | |
Create a error_activation.txt error log in the spezific plugin directory. | |
*/ | |
if(WP_DEBUG) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Gist: PHP Token Generator | |
Author: Gkiokan Sali | |
Description: Generate a unique token with a special format. | |
*/ | |
namespace Gkiokan\Tools; | |
class Token { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Run this in the .git/objects folder to set the permissions | |
# even they are flagged as immutable | |
sudo chflags -R nouchg * | |
sudo own -R $USER * | |
echo " > Persmissions have been set ." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
File: Button Controller | |
Date: today | |
Author: Gkiokan | |
Comment: A Shortcode Class Helper with VC integration | |
*/ | |
if( ! defined( 'ABSPATH' ) ) exit; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
SVG fix for 4.7.1+ | |
*/ | |
add_filter( 'wp_check_filetype_and_ext', function($filetype_ext_data, $file, $filename, $mimes) { | |
if ( substr($filename, -4) === '.svg' ) { | |
$filetype_ext_data['ext'] = 'svg'; | |
$filetype_ext_data['type'] = 'image/svg+xml'; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Snipped: Create Custom Post Extension | |
Author: Gkiokan Sali | |
Author URL: https://www.gkiokan.net | |
Date: 13.03.2017 | |
Tested on WP: 4.7.3 | |
License: MIT | |
Description: Extend your Admin List Table by custom columns in a easy way. | |
Just call the Class in your Plugin with PostcolumnExtension($YourPostType) and you are fine to go. | |
The Plugin will hook into the manage_*_posts_columns and will render the specified Column Content, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* File: This enables you svg support fot the media preview in WP. | |
* | |
***/ | |
function common_svg_media_thumbnails($response, $attachment, $meta){ | |
if($response['type'] === 'image' && $response['subtype'] === 'svg+xml' && class_exists('SimpleXMLElement')) | |
{ |
OlderNewer